Fix minor doxygen nits.
[oota-llvm.git] / lib / VMCore / Verifier.cpp
index 86a72c44fe4b1a2710017e2e1ccb0b3991587623..c01f0fe9cc18982507d9383b13a66ce8e8b45311 100644 (file)
@@ -370,6 +370,9 @@ void Verifier::visitFunction(Function &F) {
     ParamAttr::ByVal | ParamAttr::InReg |
     ParamAttr::Nest  | ParamAttr::StructRet;
 
+  const uint16_t MutuallyIncompatible2 =
+    ParamAttr::ZExt | ParamAttr::SExt;
+
   const uint16_t IntegerTypeOnly =
     ParamAttr::SExt | ParamAttr::ZExt;
 
@@ -386,6 +389,9 @@ void Verifier::visitFunction(Function &F) {
     uint16_t RetI = Attrs->getParamAttrs(0) & ReturnIncompatible;
     Assert1(!RetI, "Attribute " + Attrs->getParamAttrsText(RetI) +
             "should not apply to functions!", &F);
+    uint16_t MutI = Attrs->getParamAttrs(0) & MutuallyIncompatible2;
+    Assert1(MutI != MutuallyIncompatible2, "Attributes" + 
+            Attrs->getParamAttrsText(MutI) + "are incompatible!", &F);
 
     for (FunctionType::param_iterator I = FT->param_begin(), 
          E = FT->param_end(); I != E; ++I, ++Idx) {
@@ -400,6 +406,10 @@ void Verifier::visitFunction(Function &F) {
       Assert1(!(MutI & (MutI - 1)), "Attributes " +
               Attrs->getParamAttrsText(MutI) + "are incompatible!", &F);
 
+      uint16_t MutI2 = Attr & MutuallyIncompatible2;
+      Assert1(MutI2 != MutuallyIncompatible2, "Attributes" + 
+              Attrs->getParamAttrsText(MutI2) + "are incompatible!", &F);
+
       uint16_t IType = Attr & IntegerTypeOnly;
       Assert1(!IType || FT->getParamType(Idx-1)->isInteger(),
               "Attribute " + Attrs->getParamAttrsText(IType) +