diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-18 06:29:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-18 06:29:43 +0000 |
commit | 727671a3dc33821ed902900a649d30ccddafa26d (patch) | |
tree | 7dc0b7a92d49ab28e09db8ba30ace3de658f4f03 /llvm/tools/llvm-ld/Optimize.cpp | |
parent | 45517baf9f188baa7f9aaa69d3146645c9c4af04 (diff) | |
download | bcm5719-llvm-727671a3dc33821ed902900a649d30ccddafa26d.tar.gz bcm5719-llvm-727671a3dc33821ed902900a649d30ccddafa26d.zip |
Fix PR637
llvm-svn: 23784
Diffstat (limited to 'llvm/tools/llvm-ld/Optimize.cpp')
-rw-r--r-- | llvm/tools/llvm-ld/Optimize.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/llvm-ld/Optimize.cpp b/llvm/tools/llvm-ld/Optimize.cpp index 1961a95ef53..69ef608ee6b 100644 --- a/llvm/tools/llvm-ld/Optimize.cpp +++ b/llvm/tools/llvm-ld/Optimize.cpp @@ -111,12 +111,10 @@ void Optimize(Module* M) { addPass(Passes, createFunctionResolvingPass()); if (!DisableOptimizations) { - if (!DisableInternalize) { - // Now that composite has been compiled, scan through the module, looking - // for a main function. If main is defined, mark all other functions - // internal. - addPass(Passes, createInternalizePass()); - } + // Now that composite has been compiled, scan through the module, looking + // for a main function. If main is defined, mark all other functions + // internal. + addPass(Passes, createInternalizePass(!DisableInternalize)); // Now that we internalized some globals, see if we can hack on them! addPass(Passes, createGlobalOptimizerPass()); |