- Eliminated the deferred symbol table stuff in Module & Function, it really

wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-11-20 18:36:02 +00:00
parent c09aab0a4d
commit 6e6026b465
27 changed files with 159 additions and 250 deletions

View File

@ -304,8 +304,7 @@ static bool ProcessGlobalsWithSameName(Module &M,
}
bool FunctionResolvingPass::run(Module &M) {
SymbolTable *ST = M.getSymbolTable();
if (!ST) return false;
SymbolTable &ST = M.getSymbolTable();
std::map<string, vector<GlobalValue*> > Globals;
@ -313,7 +312,7 @@ bool FunctionResolvingPass::run(Module &M) {
// then add it to the Functions map. We do a two pass algorithm here to avoid
// problems with iterators getting invalidated if we did a one pass scheme.
//
for (SymbolTable::iterator I = ST->begin(), E = ST->end(); I != E; ++I)
for (SymbolTable::iterator I = ST.begin(), E = ST.end(); I != E; ++I)
if (const PointerType *PT = dyn_cast<PointerType>(I->first)) {
SymbolTable::VarMap &Plane = I->second;
for (SymbolTable::type_iterator PI = Plane.begin(), PE = Plane.end();