- Renamed Type::isIntegral() to Type::isInteger()
[oota-llvm.git] / lib / VMCore / Verifier.cpp
index 586a3aaadbe438d417afebfcbac03699b85e46f8..01a28352915cdfb5475a75a6c4c4a97a1c7fa538 100644 (file)
@@ -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<DominatorSet>();
     }
 
     // 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<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);
@@ -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<PointerType>(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<PointerType>(SI.getOperand(1)->getType())->getElementType();
   Assert2(ElTy == SI.getOperand(0)->getType(),
           "Stored value is not of right type for indices!", &SI, ElTy);
   visitInstruction(SI);