summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-04-17 22:32:17 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-04-17 22:32:17 +0000
commitcc2cd581cf2fb650296b63344ffb7e205027e308 (patch)
treeae1d9415cc290e632c29f357d2cb40ef4bce9a02 /llvm
parent09e3c8f7666b2175ae0b95b0f6fad12b4f5813d5 (diff)
downloadbcm5719-llvm-cc2cd581cf2fb650296b63344ffb7e205027e308.tar.gz
bcm5719-llvm-cc2cd581cf2fb650296b63344ffb7e205027e308.zip
[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
llvm-svn: 235235
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/Verifier.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index fba78e92a09..bd9f3f3c3ea 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2451,8 +2451,7 @@ void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
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);
OpenPOWER on IntegriCloud