[llvm] r237065 - Simplify a return expression and an access to an alloca's allocated type

David Blaikie dblaikie at gmail.com
Mon May 11 16:09:25 PDT 2015


Author: dblaikie
Date: Mon May 11 18:09:25 2015
New Revision: 237065

URL: http://llvm.org/viewvc/llvm-project?rev=237065&view=rev
Log:
Simplify a return expression and an access to an alloca's allocated type

Modified:
    llvm/trunk/lib/IR/Verifier.cpp

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=237065&r1=237064&r2=237065&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon May 11 18:09:25 2015
@@ -3065,8 +3065,8 @@ bool Verifier::VerifyIntrinsicType(Type
       dyn_cast<PointerType>(ThisArgVecTy->getVectorElementType());
     if (!ThisArgEltTy)
       return true;
-    return (!(ThisArgEltTy->getElementType() ==
-            ReferenceType->getVectorElementType()));
+    return ThisArgEltTy->getElementType() !=
+           ReferenceType->getVectorElementType();
   }
   }
   llvm_unreachable("unhandled");
@@ -3192,7 +3192,7 @@ void Verifier::visitIntrinsicFunctionCal
       Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI);
       Assert(isa<Constant>(CI.getArgOperand(1)),
              "llvm.gcroot parameter #2 must be a constant.", &CI);
-      if (!AI->getType()->getElementType()->isPointerTy()) {
+      if (!AI->getAllocatedType()->isPointerTy()) {
         Assert(!isa<ConstantPointerNull>(CI.getArgOperand(1)),
                "llvm.gcroot parameter #1 must either be a pointer alloca, "
                "or argument #2 must be a non-null constant.",





More information about the llvm-commits mailing list