diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-18 06:29:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-18 06:29:43 +0000 |
commit | 727671a3dc33821ed902900a649d30ccddafa26d (patch) | |
tree | 7dc0b7a92d49ab28e09db8ba30ace3de658f4f03 /llvm/tools/gccld/GenerateCode.cpp | |
parent | 45517baf9f188baa7f9aaa69d3146645c9c4af04 (diff) | |
download | bcm5719-llvm-727671a3dc33821ed902900a649d30ccddafa26d.tar.gz bcm5719-llvm-727671a3dc33821ed902900a649d30ccddafa26d.zip |
Fix PR637
llvm-svn: 23784
Diffstat (limited to 'llvm/tools/gccld/GenerateCode.cpp')
-rw-r--r-- | llvm/tools/gccld/GenerateCode.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp index 72a159a1de1..0d945493704 100644 --- a/llvm/tools/gccld/GenerateCode.cpp +++ b/llvm/tools/gccld/GenerateCode.cpp @@ -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()); |