[llvm] r235235 - [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
David Blaikie
dblaikie at gmail.com
Fri Apr 17 15:32:18 PDT 2015
Author: dblaikie
Date: Fri Apr 17 17:32:17 2015
New Revision: 235235
URL: http://llvm.org/viewvc/llvm-project?rev=235235&view=rev
Log:
[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
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=235235&r1=235234&r2=235235&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Fri Apr 17 17:32:17 2015
@@ -2451,8 +2451,7 @@ void Verifier::visitGetElementPtrInst(Ge
Assert(isa<PointerType>(TargetTy),
"GEP base pointer is not a vector or a vector of pointers", &GEP);
- Assert(cast<PointerType>(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);
More information about the llvm-commits
mailing list