aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-ld/Optimize.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-18 06:29:43 +0000
committerChris Lattner <sabre@nondot.org>2005-10-18 06:29:43 +0000
commitfbcd54f2cbf89bd277a0531711cdc0e7cb1f15a3 (patch)
tree91990cbbd76f63ba867c7fb8ac7c2c9175d97e30 /tools/llvm-ld/Optimize.cpp
parenta27ea769eb6f8be437ae1ff28ff49018a578f019 (diff)
downloadexternal_llvm-fbcd54f2cbf89bd277a0531711cdc0e7cb1f15a3.zip
external_llvm-fbcd54f2cbf89bd277a0531711cdc0e7cb1f15a3.tar.gz
external_llvm-fbcd54f2cbf89bd277a0531711cdc0e7cb1f15a3.tar.bz2
Fix PR637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld/Optimize.cpp')
-rw-r--r--tools/llvm-ld/Optimize.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp
index 1961a95..69ef608 100644
--- a/tools/llvm-ld/Optimize.cpp
+++ b/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());