It seems logical that InReg should be incompatible
authorDuncan Sands <baldrick@free.fr>
Fri, 27 Jul 2007 16:45:18 +0000 (16:45 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 27 Jul 2007 16:45:18 +0000 (16:45 +0000)
with StructReturn and ByVal, so make it so.

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

lib/VMCore/Verifier.cpp

index 7dc464789680b0a6cdf77a70f8680326a4ddaadf..6d4aa986f712c98328105fc0fb4459182c3e91ae 100644 (file)
@@ -365,7 +365,8 @@ void Verifier::visitFunction(Function &F) {
     ParamAttr::NoReturn | ParamAttr::NoUnwind;
 
   const uint16_t MutuallyIncompatible =
-    ParamAttr::ByVal | ParamAttr::Nest | ParamAttr::StructRet;
+    ParamAttr::ByVal | ParamAttr::InReg |
+    ParamAttr::Nest  | ParamAttr::StructRet;
 
   const uint16_t IntegerTypeOnly =
     ParamAttr::SExt | ParamAttr::ZExt;
@@ -417,8 +418,6 @@ void Verifier::visitFunction(Function &F) {
       if (Attrs->paramHasAttr(Idx, ParamAttr::Nest)) {
         Assert1(!SawNest, "More than one parameter has attribute nest!", &F);
         SawNest = true;
-        Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::InReg),
-                "Attributes nest and inreg are incompatible!", &F);
       }
 
       if (Attrs->paramHasAttr(Idx, ParamAttr::StructRet)) {