After a discussion with Anton, it turns out that the InReg attribute is not
authorReid Spencer <rspencer@reidspencer.com>
Tue, 31 Jul 2007 14:39:10 +0000 (14:39 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 31 Jul 2007 14:39:10 +0000 (14:39 +0000)
permitted on function results. So, revert the last patch to make it illegal.

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

lib/AsmParser/llvmAsmParser.y
lib/VMCore/Verifier.cpp

index 584eb8fdffb088ce854c3335d5279b9ace2375f1..fd2713f3071118fdec65b1be280ac45a96e0ce05 100644 (file)
@@ -1245,7 +1245,6 @@ FuncAttr      : NORETURN { $$ = ParamAttr::NoReturn; }
               | NOUNWIND { $$ = ParamAttr::NoUnwind; }
               | ZEROEXT  { $$ = ParamAttr::ZExt;     }
               | SIGNEXT  { $$ = ParamAttr::SExt;     }
-              | INREG    { $$ = ParamAttr::InReg;    }
               ;
 
 OptFuncAttrs  : /* empty */ { $$ = ParamAttr::None; }
index 5c4e1b36843622187e45817f3d26a67741bd4b0c..6d4aa986f712c98328105fc0fb4459182c3e91ae 100644 (file)
@@ -358,7 +358,8 @@ void Verifier::visitFunction(Function &F) {
           "Invalid struct-return function!", &F);
 
   const uint16_t ReturnIncompatible =
-    ParamAttr::ByVal | ParamAttr::Nest | ParamAttr::StructRet;
+    ParamAttr::ByVal | ParamAttr::InReg |
+    ParamAttr::Nest  | ParamAttr::StructRet;
 
   const uint16_t ParameterIncompatible =
     ParamAttr::NoReturn | ParamAttr::NoUnwind;