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
This commit is contained in:
Chris Lattner 2007-06-06 20:51:14 +00:00
parent 77c2b692e2
commit 037a704f4f

View File

@ -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