diff options
Diffstat (limited to 'tools/llvm-ld/Optimize.cpp')
-rw-r--r-- | tools/llvm-ld/Optimize.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/llvm-ld/Optimize.cpp b/tools/llvm-ld/Optimize.cpp index 1961a95ef5..69ef608ee6 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()); |