Allow the INREG parameter attribute to be added to functions. This permits the
authorReid Spencer <rspencer@reidspencer.com>
Tue, 31 Jul 2007 06:37:27 +0000 (06:37 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 31 Jul 2007 06:37:27 +0000 (06:37 +0000)
function result to be passed in a register. This implements the GCC regparm
function attribute for llvm by translation to the InReg parameter attribute
and fixes test/CFrontend/2002-07-30-SubregSetAssertion.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40619 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index fd2713f3071118fdec65b1be280ac45a96e0ce05..584eb8fdffb088ce854c3335d5279b9ace2375f1 100644 (file)
@@ -1245,6 +1245,7 @@ FuncAttr      : NORETURN { $$ = ParamAttr::NoReturn; }
               | NOUNWIND { $$ = ParamAttr::NoUnwind; }
               | ZEROEXT  { $$ = ParamAttr::ZExt;     }
               | SIGNEXT  { $$ = ParamAttr::SExt;     }
+              | INREG    { $$ = ParamAttr::InReg;    }
               ;
 
 OptFuncAttrs  : /* empty */ { $$ = ParamAttr::None; }