X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FVerifier.cpp;h=f5b0550d88ea3f1097cad2c324096393ca14cfd7;hb=ef9b9a793949469cdaa4ab6d0173136229dcab7b;hp=9dc892e5aeffde3c97c9ed8ce97dc7ecf5db9f25;hpb=832254e1c2387c0cbeb0a820b8315fbe85cb003a;p=oota-llvm.git diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 9dc892e5aef..f5b0550d88e 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -51,7 +51,7 @@ #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" #include "llvm/PassManager.h" -#include "llvm/SymbolTable.h" +#include "llvm/ValueSymbolTable.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Support/CFG.h" #include "llvm/Support/InstVisitor.h" @@ -175,7 +175,7 @@ namespace { // Anonymous namespace for class // Verification methods... void verifyTypeSymbolTable(TypeSymbolTable &ST); - void verifyValueSymbolTable(SymbolTable &ST); + void verifyValueSymbolTable(ValueSymbolTable &ST); void visitGlobalValue(GlobalValue &GV); void visitGlobalVariable(GlobalVariable &GV); void visitFunction(Function &F); @@ -307,20 +307,18 @@ void Verifier::verifyTypeSymbolTable(TypeSymbolTable &ST) { // verifySymbolTable - Verify that a function or module symbol table is ok // -void Verifier::verifyValueSymbolTable(SymbolTable &ST) { - - // Loop over all of the values in all type planes in the symbol table. - for (SymbolTable::plane_const_iterator PI = ST.plane_begin(), - PE = ST.plane_end(); PI != PE; ++PI) - for (SymbolTable::value_const_iterator VI = PI->second.begin(), - VE = PI->second.end(); VI != VE; ++VI) { - Value *V = VI->second; - // Check that there are no void typed values in the symbol table. Values - // with a void type cannot be put into symbol tables because they cannot - // have names! - Assert1(V->getType() != Type::VoidTy, - "Values with void type are not allowed to have names!", V); - } +void Verifier::verifyValueSymbolTable(ValueSymbolTable &ST) { + + // Loop over all of the values in the symbol table. + for (ValueSymbolTable::const_iterator VI = ST.begin(), VE = ST.end(); + VI != VE; ++VI) { + Value *V = VI->second; + // Check that there are no void typed values in the symbol table. Values + // with a void type cannot be put into symbol tables because they cannot + // have names! + Assert1(V->getType() != Type::VoidTy, + "Values with void type are not allowed to have names!", V); + } } // visitFunction - Verify that a function is ok.