diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-12-19 09:38:31 +0000 |
commit | 73ddd4f00dd2a4b7b68a1500bc7e3322cab51270 (patch) | |
tree | 0a97ae74fa5aeee55b2ec9bf7ef6c2296a8d94b5 /lib/AsmParser/llvmAsmParser.y | |
parent | f23d0d392ab47e191e1bbd17dc7487b9d461485c (diff) | |
download | llvm-73ddd4f00dd2a4b7b68a1500bc7e3322cab51270.tar.gz llvm-73ddd4f00dd2a4b7b68a1500bc7e3322cab51270.tar.bz2 llvm-73ddd4f00dd2a4b7b68a1500bc7e3322cab51270.tar.xz |
Commit missed files from nocapture change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 8b54251c65..7028ea3fe0 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1136,8 +1136,8 @@ Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) { %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 @@ OptCallingConv : /*empty*/ { $$ = CallingConv::C; } | 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 @@ OptAlign : /*empty*/ { $$ = 0; } | $$ = $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 @@ OptCAlign : /*empty*/ { $$ = 0; } | $$ = $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 @@ GlobalVarAttribute : SectionString { | 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 }; |