aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-ld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-06 20:51:14 +0000
committerChris Lattner <sabre@nondot.org>2007-06-06 20:51:14 +0000
commit037a704f4ffde640e38df71b68f17efcc729298f (patch)
tree2776d0adff56f6a01afb38ddb35909a6261449b2 /tools/llvm-ld
parent77c2b692e2b8b8de4982ff4cafd570477484f10c (diff)
if internalize is disabled, don't run the pass at all!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r--tools/llvm-ld/Optimize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp
index 96a8860e18..49b8f4225b 100644
--- a/tools/llvm-ld/Optimize.cpp
+++ b/tools/llvm-ld/Optimize.cpp
@@ -122,7 +122,8 @@ void Optimize(Module* M) {
// 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));
+ if (!DisableInternalize)
+ addPass(Passes, createInternalizePass(true));
// Propagate constants at call sites into the functions they call. This
// opens opportunities for globalopt (and inlining) by substituting function