aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/SymbolTable.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-15 21:26:29 +0000
committerChris Lattner <sabre@nondot.org>2002-10-15 21:26:29 +0000
commit0dad6e9c95984804953db0fdcbe0c907d9ee351e (patch)
treefba6caf31e19c26de8cbd61b9e7eeccce09c0026 /lib/VMCore/SymbolTable.cpp
parent1b7de965dd3291f4bf96f0a9ce7cf5fdcb4cd7fd (diff)
- Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab. These aren't needed at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/SymbolTable.cpp')
-rw-r--r--lib/VMCore/SymbolTable.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp
index 6d09c7d566..069f711101 100644
--- a/lib/VMCore/SymbolTable.cpp
+++ b/lib/VMCore/SymbolTable.cpp
@@ -72,7 +72,7 @@ string SymbolTable::getUniqueName(const Type *Ty, const string &BaseName) {
// lookup - Returns null on failure...
-Value *SymbolTable::localLookup(const Type *Ty, const string &Name) {
+Value *SymbolTable::lookup(const Type *Ty, const string &Name) {
iterator I = find(Ty);
if (I != end()) { // We have symbols in that plane...
type_iterator J = I->second.find(Name);
@@ -83,13 +83,6 @@ Value *SymbolTable::localLookup(const Type *Ty, const string &Name) {
return 0;
}
-// lookup - Returns null on failure...
-Value *SymbolTable::lookup(const Type *Ty, const string &Name) {
- Value *LV = localLookup(Ty, Name);
- if (LV) return LV;
- return ParentSymTab ? ParentSymTab->lookup(Ty, Name) : 0;
-}
-
void SymbolTable::remove(Value *N) {
assert(N->hasName() && "Value doesn't have name!");
if (InternallyInconsistent) return;
@@ -154,7 +147,7 @@ Value *SymbolTable::removeEntry(iterator Plane, type_iterator Entry) {
void SymbolTable::insertEntry(const string &Name, const Type *VTy, Value *V) {
// Check to see if there is a naming conflict. If so, rename this value!
- if (localLookup(VTy, Name)) {
+ if (lookup(VTy, Name)) {
string UniqueName = getUniqueName(VTy, Name);
assert(InternallyInconsistent == false && "Infinite loop inserting entry!");
InternallyInconsistent = true;
@@ -339,9 +332,4 @@ static void DumpPlane(const pair<const Type *, map<const string, Value *> >&P) {
void SymbolTable::dump() const {
std::cout << "Symbol table dump:\n";
for_each(begin(), end(), DumpPlane);
-
- if (ParentSymTab) {
- std::cout << "Parent ";
- ParentSymTab->dump();
- }
}