From 6e6026b46569b01f8f6d4dcdb6c899c3a9c76b3e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Nov 2002 18:36:02 +0000 Subject: - 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 --- lib/Transforms/IPO/FunctionResolution.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/IPO/FunctionResolution.cpp') diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp index cbcfa2aba8..bb3a9af659 100644 --- a/lib/Transforms/IPO/FunctionResolution.cpp +++ b/lib/Transforms/IPO/FunctionResolution.cpp @@ -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 > 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(I->first)) { SymbolTable::VarMap &Plane = I->second; for (SymbolTable::type_iterator PI = Plane.begin(), PE = Plane.end(); -- cgit v1.2.3-18-g5258