X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FVMCore%2FValue.cpp;h=da3d87f9d2e7b7c4d623b7630a1767db3e738e33;hb=ee37bb34d133060318966b26317e063a1fee0c5f;hp=ac9f7012ef17ccbb5e5f2dab2415d8bd113cc7a7;hpb=25d15a7ff75f04a26c9643e849807895ab67babd;p=oota-llvm.git diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index ac9f7012ef1..da3d87f9d2e 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -1,13 +1,11 @@ //===-- Value.cpp - Implement the Value class -----------------------------===// // -// This file implements the Value, User, and SymTabValue classes. +// This file implements the Value and User classes. // //===----------------------------------------------------------------------===// -#include "llvm/ValueHolderImpl.h" #include "llvm/InstrTypes.h" #include "llvm/SymbolTable.h" -#include "llvm/SymTabValue.h" #include "llvm/DerivedTypes.h" #include @@ -34,8 +32,7 @@ Value::~Value() { // a // if (Uses.begin() != Uses.end()) { - std::cerr << "While deleting: "; - dump(); + std::cerr << "While deleting: " << Ty << "%" << Name << "\n"; for (use_const_iterator I = Uses.begin(); I != Uses.end(); ++I) { std::cerr << "Use still stuck around after Def is destroyed:"; (*I)->dump(); @@ -121,42 +118,3 @@ void User::replaceUsesOfWith(Value *From, Value *To) { } -//===----------------------------------------------------------------------===// -// SymTabValue Class -//===----------------------------------------------------------------------===// - -SymTabValue::SymTabValue(Value *p) : ValueParent(p) { - assert(ValueParent && "SymTavValue without parent!?!"); - ParentSymTab = SymTab = 0; -} - - -SymTabValue::~SymTabValue() { - delete SymTab; -} - -void SymTabValue::setParentSymTab(SymbolTable *ST) { - ParentSymTab = ST; - if (SymTab) - SymTab->setParentSymTab(ST); -} - -SymbolTable *SymTabValue::getSymbolTableSure() { - if (!SymTab) SymTab = new SymbolTable(ParentSymTab); - return SymTab; -} - -// hasSymbolTable() - Returns true if there is a symbol table allocated to -// this object AND if there is at least one name in it! -// -bool SymTabValue::hasSymbolTable() const { - if (!SymTab) return false; - - for (SymbolTable::const_iterator I = SymTab->begin(); - I != SymTab->end(); ++I) { - if (I->second.begin() != I->second.end()) - return true; // Found nonempty type plane! - } - - return false; -}