From: David Blaikie Date: Fri, 17 Apr 2015 22:32:17 +0000 (+0000) Subject: [opaque pointer type] Query the GEP for its source element type directly rather than... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=1b44f585f970eda9098e9c386d956ce2f962d6c7 [opaque pointer type] Query the GEP for its source element type directly rather than finding it through the pointer type of the first operand in the Verifier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235235 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index fba78e92a09..bd9f3f3c3ea 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -2451,8 +2451,7 @@ void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { Assert(isa(TargetTy), "GEP base pointer is not a vector or a vector of pointers", &GEP); - Assert(cast(TargetTy)->getElementType()->isSized(), - "GEP into unsized type!", &GEP); + Assert(GEP.getSourceElementType()->isSized(), "GEP into unsized type!", &GEP); Assert(GEP.getPointerOperandType()->isVectorTy() == GEP.getType()->isVectorTy(), "Vector GEP must return a vector value", &GEP);