diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-20 18:07:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-20 18:07:48 +0000 |
commit | 2c08dcc276e218193beffbddf2a30f4d88e8af58 (patch) | |
tree | 563b64be854b52ad7a7c74fb882948f85f4c54d5 /lib/VMCore | |
parent | d2cc017f4672efad7b16b5c78031f50fe8c95794 (diff) | |
download | external_llvm-2c08dcc276e218193beffbddf2a30f4d88e8af58.zip external_llvm-2c08dcc276e218193beffbddf2a30f4d88e8af58.tar.gz external_llvm-2c08dcc276e218193beffbddf2a30f4d88e8af58.tar.bz2 |
Eliminate the concept of a deferred symbol table. The optimization really isn't,
and it causes obscure bugs to show up in passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Function.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 5edd9ae..9b837dc 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -84,7 +84,7 @@ Function::Function(const FunctionType *Ty, bool isInternal, BasicBlocks.setParent(this); ArgumentList.setItemParent(this); ArgumentList.setParent(this); - SymTab = 0; + SymTab = new SymbolTable(); // Create the arguments vector, all arguments start out unnamed. for (unsigned i = 0, e = Ty->getNumParams(); i != e; ++i) { @@ -137,27 +137,6 @@ const Type *Function::getReturnType() const { return getFunctionType()->getReturnType(); } -SymbolTable *Function::getSymbolTableSure() { - if (!SymTab) SymTab = new SymbolTable(); - 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 Function::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; -} - - // dropAllReferences() - This function causes all the subinstructions to "let // go" of all references that they are maintaining. This allows one to // 'delete' a whole class at a time, even though there may be circular |