aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/FunctionResolution.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-20 18:36:02 +0000
committerChris Lattner <sabre@nondot.org>2002-11-20 18:36:02 +0000
commit6e6026b46569b01f8f6d4dcdb6c899c3a9c76b3e (patch)
tree57322a305c9e9d3273ae9d3d09728ec2662e97d8 /lib/Transforms/IPO/FunctionResolution.cpp
parentc09aab0a4de7e3f65dd830803faadb7abae28872 (diff)
- 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
Diffstat (limited to 'lib/Transforms/IPO/FunctionResolution.cpp')
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp5
1 files changed, 2 insertions, 3 deletions
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<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();