diff options
author | Chris Lattner <sabre@nondot.org> | 2006-08-27 22:42:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-08-27 22:42:52 +0000 |
commit | 7f8897f22e88271cfa114998a4d6088e7c8e8e11 (patch) | |
tree | bf5610a6be6233216bdaa701a92527bc23b86cff /lib/Transforms/IPO/FunctionResolution.cpp | |
parent | 21a82e6fc718b4a2cc0281a4a43477ba940d3586 (diff) | |
download | llvm-7f8897f22e88271cfa114998a4d6088e7c8e8e11.tar.gz llvm-7f8897f22e88271cfa114998a4d6088e7c8e8e11.tar.bz2 llvm-7f8897f22e88271cfa114998a4d6088e7c8e8e11.tar.xz |
eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionResolution.cpp')
-rw-r--r-- | lib/Transforms/IPO/FunctionResolution.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp index d8b1a862ea..a514b92b5f 100644 --- a/lib/Transforms/IPO/FunctionResolution.cpp +++ b/lib/Transforms/IPO/FunctionResolution.cpp @@ -43,7 +43,7 @@ namespace { bool runOnModule(Module &M); }; - RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions"); + RegisterPass<FunctionResolvingPass> X("funcresolve", "Resolve Functions"); } ModulePass *llvm::createFunctionResolvingPass() { @@ -314,7 +314,8 @@ bool FunctionResolvingPass::runOnModule(Module &M) { Globals[F->getName()].push_back(F); } - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ) { + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ) { GlobalVariable *GV = I++; if (GV->use_empty() && GV->isExternal()) { M.getGlobalList().erase(GV); @@ -346,7 +347,8 @@ bool FunctionResolvingPass::runOnModule(Module &M) { ++I; } - for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ) + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ) if (I->isExternal() && I->use_empty()) { GlobalVariable *GV = I; ++I; |