diff options
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y.cvs')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y.cvs | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs index af8e3af..7028ea3 100644 --- a/lib/AsmParser/llvmAsmParser.y.cvs +++ b/lib/AsmParser/llvmAsmParser.y.cvs @@ -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); } ; @@ -1284,9 +1285,10 @@ OptAttributes : /* empty */ { $$ = Attribute::None; } } ; -RetAttr : INREG { $$ = Attribute::InReg; } +RetAttr : INREG { $$ = Attribute::InReg; } | ZEROEXT { $$ = Attribute::ZExt; } | SIGNEXT { $$ = Attribute::SExt; } + | NOALIAS { $$ = Attribute::NoAlias; } ; OptRetAttrs : /* empty */ { $$ = Attribute::None; } @@ -1330,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; } | @@ -1337,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 }; @@ -1366,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 }; |