Commit missed files from nocapture change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp
index 20b2b88..b8f497a 100644
--- a/lib/AsmParser/LLLexer.cpp
+++ b/lib/AsmParser/LLLexer.cpp
@@ -491,6 +491,7 @@
   KEYWORD("nounwind", NOUNWIND);
   KEYWORD("noreturn", NORETURN);
   KEYWORD("noalias", NOALIAS);
+  KEYWORD("nocapture", NOCAPTURE);
   KEYWORD("byval", BYVAL);
   KEYWORD("nest", NEST);
   KEYWORD("readnone", READNONE);
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 8b54251..7028ea3 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1136,8 +1136,8 @@
 %token <OtherOpVal> EXTRACTVALUE INSERTVALUE
 
 // Function Attributes
-%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST
-%token READNONE READONLY GC OPTSIZE NOINLINE ALWAYSINLINE SSP SSPREQ
+%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS NOCAPTURE BYVAL
+%token READNONE READONLY GC OPTSIZE NOINLINE ALWAYSINLINE SSP SSPREQ NEST
 
 // Visibility Styles
 %token DEFAULT HIDDEN PROTECTED
@@ -1265,15 +1265,16 @@
                   CHECK_FOR_ERROR
                  };
 
-Attribute     : ZEROEXT { $$ = Attribute::ZExt;      }
-              | ZEXT    { $$ = Attribute::ZExt;      }
-              | SIGNEXT { $$ = Attribute::SExt;      }
-              | SEXT    { $$ = Attribute::SExt;      }
-              | INREG   { $$ = Attribute::InReg;     }
-              | SRET    { $$ = Attribute::StructRet; }
-              | NOALIAS { $$ = Attribute::NoAlias;   }
-              | BYVAL   { $$ = Attribute::ByVal;     }
-              | NEST    { $$ = Attribute::Nest;      }
+Attribute     : ZEROEXT   { $$ = Attribute::ZExt;      }
+              | ZEXT      { $$ = Attribute::ZExt;      }
+              | SIGNEXT   { $$ = Attribute::SExt;      }
+              | SEXT      { $$ = Attribute::SExt;      }
+              | INREG     { $$ = Attribute::InReg;     }
+              | SRET      { $$ = Attribute::StructRet; }
+              | NOALIAS   { $$ = Attribute::NoAlias;   }
+              | NOCAPTURE { $$ = Attribute::NoCapture; }
+              | BYVAL     { $$ = Attribute::ByVal;     }
+              | NEST      { $$ = Attribute::Nest;      }
               | ALIGN EUINT64VAL { $$ =
                           Attribute::constructAlignmentFromInt($2);    }
               ;
@@ -1331,6 +1332,8 @@
   $$ = $2;
   if ($$ != 0 && !isPowerOf2_32($$))
     GEN_ERROR("Alignment must be a power of two");
+  if ($$ > 0x40000000)
+    GEN_ERROR("Alignment too large");
   CHECK_FOR_ERROR
 };
 OptCAlign : /*empty*/            { $$ = 0; } |
@@ -1338,6 +1341,8 @@
   $$ = $3;
   if ($$ != 0 && !isPowerOf2_32($$))
     GEN_ERROR("Alignment must be a power of two");
+  if ($$ > 0x40000000)
+    GEN_ERROR("Alignment too large");
   CHECK_FOR_ERROR
 };
 
@@ -1367,6 +1372,8 @@
   | ALIGN EUINT64VAL {
     if ($2 != 0 && !isPowerOf2_32($2))
       GEN_ERROR("Alignment must be a power of two");
+    if ($2 > 0x40000000)
+      GEN_ERROR("Alignment too large");
     CurGV->setAlignment($2);
     CHECK_FOR_ERROR
   };