From 951c8c4cf3083807a8c82884020d52943fd7333e Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 8 May 2015 22:47:50 +0000 Subject: [PATCH] [opaque pointer type] Cleanup a few references to pointee types using nearby non-pointee types of the same value & cleanup a convoluted return expression while I'm here llvm-svn: 236912 --- llvm/lib/IR/Verifier.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 374f8f210be2..49f8a7ca4a11 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1503,7 +1503,7 @@ void Verifier::VerifyStatepoint(ImmutableCallSite CS) { const PointerType *PT = dyn_cast(Target->getType()); Assert(PT && PT->getElementType()->isFunctionTy(), "gc.statepoint callee must be of function pointer type", &CI, Target); - FunctionType *TargetFuncType = cast(PT->getElementType()); + FunctionType *TargetFuncType = CS.getFunctionType(); const Value *NumCallArgsV = CS.getArgument(1); Assert(isa(NumCallArgsV), @@ -3065,8 +3065,8 @@ bool Verifier::VerifyIntrinsicType(Type *Ty, dyn_cast(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::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { Assert(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI); Assert(isa(CI.getArgOperand(1)), "llvm.gcroot parameter #2 must be a constant.", &CI); - if (!AI->getType()->getElementType()->isPointerTy()) { + if (!AI->getAllocatedType()->isPointerTy()) { Assert(!isa(CI.getArgOperand(1)), "llvm.gcroot parameter #1 must either be a pointer alloca, " "or argument #2 must be a non-null constant.",