aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index da65b1ce30..01a2835291 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -321,8 +321,9 @@ void Verifier::visitBinaryOperator(BinaryOperator &B) {
}
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
- const Type *ElTy = MemAccessInst::getIndexedType(GEP.getOperand(0)->getType(),
- GEP.copyIndices(), true);
+ const Type *ElTy =
+ GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(),
+ std::vector<Value*>(GEP.idx_begin(), GEP.idx_end()), true);
Assert1(ElTy, "Invalid indices for GEP pointer type!", &GEP);
Assert2(PointerType::get(ElTy) == GEP.getType(),
"GEP is not of right type for indices!", &GEP, ElTy);