Add support for the noreturn and nounwind function attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-03-22 02:13:23 +00:00
parent 27e4da93b6
commit a39dfd39e4
2 changed files with 4 additions and 1 deletions

View File

@ -235,6 +235,8 @@ x86_fastcallcc { return X86_FASTCALLCC_TOK; }
inreg { return INREG; }
sret { return SRET; }
nounwind { return NOUNWIND; }
noreturn { return NORETURN; }
void { RET_TY(Type::VoidTy, VOID); }
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
// Function Attributes
%token NORETURN INREG SRET
%token NORETURN INREG SRET NOUNWIND
// Visibility Styles
%token DEFAULT HIDDEN
@ -1204,6 +1204,7 @@ OptParamAttrs : /* empty */ { $$ = FunctionType::NoAttributeSet; }
;
FuncAttr : NORETURN { $$ = FunctionType::NoReturnAttribute; }
| NOUNWIND { $$ = FunctionType::NoUnwindAttribute; }
| ParamAttr
;