X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FVerifier.cpp;h=01a28352915cdfb5475a75a6c4c4a97a1c7fa538;hb=ce8a14915d2971039b576e03a32e0ba7c421dba7;hp=586a3aaadbe438d417afebfcbac03699b85e46f8;hpb=9ce231f3aecec46902ac9a108c5721a4d9c62a61;p=oota-llvm.git diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 586a3aaadbe..01a28352915 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -92,7 +92,7 @@ namespace { // Anonymous namespace for class virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); if (RealPass) - AU.addRequired(DominatorSet::ID); + AU.addRequired(); } // Verification methods... @@ -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(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); @@ -330,18 +331,16 @@ void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { } void Verifier::visitLoadInst(LoadInst &LI) { - const Type *ElTy = LoadInst::getIndexedType(LI.getOperand(0)->getType(), - LI.copyIndices()); - Assert1(ElTy, "Invalid indices for load pointer type!", &LI); + const Type *ElTy = + cast(LI.getOperand(0)->getType())->getElementType(); Assert2(ElTy == LI.getType(), "Load is not of right type for indices!", &LI, ElTy); visitInstruction(LI); } void Verifier::visitStoreInst(StoreInst &SI) { - const Type *ElTy = StoreInst::getIndexedType(SI.getOperand(1)->getType(), - SI.copyIndices()); - Assert1(ElTy, "Invalid indices for store pointer type!", &SI); + const Type *ElTy = + cast(SI.getOperand(1)->getType())->getElementType(); Assert2(ElTy == SI.getOperand(0)->getType(), "Stored value is not of right type for indices!", &SI, ElTy); visitInstruction(SI);