Fix PR637

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-10-18 06:29:43 +00:00
parent a27ea769eb
commit fbcd54f2cb
2 changed files with 8 additions and 12 deletions

View File

@ -216,12 +216,10 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize,
addPass(Passes, createFunctionResolvingPass());
if (!DisableOptimizations) {
if (Internalize) {
// 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(Internalize));
// Now that we internalized some globals, see if we can hack on them!
addPass(Passes, createGlobalOptimizerPass());

View File

@ -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());