diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-04-28 04:52:28 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-04-28 04:52:28 +0000 |
| commit | 30ddf7f57f9625465568522c1a883d4e22333726 (patch) | |
| tree | 4f5609e7f381a47bdb03ac30bc0b89fee07fbfdd | |
| parent | 2c8ff6345f7e119e5fe80be06d3284501b593a94 (diff) | |
| download | bcm5719-llvm-30ddf7f57f9625465568522c1a883d4e22333726.tar.gz bcm5719-llvm-30ddf7f57f9625465568522c1a883d4e22333726.zip | |
The contents of the SymTabValue class have been incorporated into the
Module and Function classes directly.
llvm-svn: 2356
| -rw-r--r-- | llvm/lib/VMCore/Value.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index 1309c566ad8..da3d87f9d2e 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -1,12 +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/InstrTypes.h" #include "llvm/SymbolTable.h" -#include "llvm/SymTabValue.h" #include "llvm/DerivedTypes.h" #include <algorithm> @@ -119,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; -} |

