Add support for the noreturn and nounwind function attributes.

llvm-svn: 35258
This commit is contained in:
Reid Spencer 2007-03-22 02:13:23 +00:00
parent b0da7ed9c8
commit a483577d21
2 changed files with 4 additions and 1 deletions

View File

@ -235,6 +235,8 @@ x86_fastcallcc { return X86_FASTCALLCC_TOK; }
inreg { return INREG; } inreg { return INREG; }
sret { return SRET; } sret { return SRET; }
nounwind { return NOUNWIND; }
noreturn { return NORETURN; }
void { RET_TY(Type::VoidTy, VOID); } void { RET_TY(Type::VoidTy, VOID); }
float { RET_TY(Type::FloatTy, FLOAT); } float { RET_TY(Type::FloatTy, FLOAT); }

View File

@ -1078,7 +1078,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
%token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR %token <OtherOpVal> EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR
// Function Attributes // Function Attributes
%token NORETURN INREG SRET %token NORETURN INREG SRET NOUNWIND
// Visibility Styles // Visibility Styles
%token DEFAULT HIDDEN %token DEFAULT HIDDEN
@ -1204,6 +1204,7 @@ OptParamAttrs : /* empty */ { $$ = FunctionType::NoAttributeSet; }
; ;
FuncAttr : NORETURN { $$ = FunctionType::NoReturnAttribute; } FuncAttr : NORETURN { $$ = FunctionType::NoReturnAttribute; }
| NOUNWIND { $$ = FunctionType::NoUnwindAttribute; }
| ParamAttr | ParamAttr
; ;