diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-04-17 22:32:20 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-04-17 22:32:20 +0000 |
commit | d0a2482870218dce13c629f5acce96d8dafffcfd (patch) | |
tree | 0cabe6cbcc64a933f97edbd1a90c8f517bfc027d /llvm/lib/IR/Verifier.cpp | |
parent | cc2cd581cf2fb650296b63344ffb7e205027e308 (diff) | |
download | bcm5719-llvm-d0a2482870218dce13c629f5acce96d8dafffcfd.tar.gz bcm5719-llvm-d0a2482870218dce13c629f5acce96d8dafffcfd.zip |
[opaque pointer type] Access the pointee of the result type from the GEP rather than pulling it out of the pointer result type
The implementation of this GEP::getResultElementType will be refactored
to either rely on a member variable, or recompute the value from the
indicies (any preferences?).
llvm-svn: 235236
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index bd9f3f3c3ea..e14f1036912 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2462,8 +2462,7 @@ void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { Assert(ElTy, "Invalid indices for GEP pointer type!", &GEP); Assert(GEP.getType()->getScalarType()->isPointerTy() && - cast<PointerType>(GEP.getType()->getScalarType()) - ->getElementType() == ElTy, + GEP.getResultElementType() == ElTy, "GEP is not of right type for indices!", &GEP, ElTy); if (GEP.getPointerOperandType()->isVectorTy()) { |