summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-17 16:41:19 +0000
committerChris Lattner <sabre@nondot.org>2004-11-17 16:41:19 +0000
commit7a3767521dbd76f9aa09edd5aa6e43bfe231aefc (patch)
tree2c529757e4f3fe69db73473690e13c60b02f107a /llvm/tools
parent1154bb6b438135bc21f012f61ef20e269c0b8d58 (diff)
downloadbcm5719-llvm-7a3767521dbd76f9aa09edd5aa6e43bfe231aefc.tar.gz
bcm5719-llvm-7a3767521dbd76f9aa09edd5aa6e43bfe231aefc.zip
-disable-opt is not -O0, it's okay for it to disable internalize.
llvm-svn: 17911
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/gccld/GenerateCode.cpp14
-rw-r--r--llvm/tools/gccld/gccld.cpp3
2 files changed, 9 insertions, 8 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp
index e604921a90c..f22319df5bf 100644
--- a/llvm/tools/gccld/GenerateCode.cpp
+++ b/llvm/tools/gccld/GenerateCode.cpp
@@ -153,14 +153,14 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
// arguments). This pass merges the two functions.
addPass(Passes, createFunctionResolvingPass());
- 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());
- }
-
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 we internalized some globals, see if we can hack on them!
addPass(Passes, createGlobalOptimizerPass());
diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp
index 87b1d6fa3e4..5a19866bca4 100644
--- a/llvm/tools/gccld/gccld.cpp
+++ b/llvm/tools/gccld/gccld.cpp
@@ -163,7 +163,8 @@ int main(int argc, char **argv, char **envp) {
std::string ModuleID("gccld-output");
std::auto_ptr<Module> Composite(new Module(ModuleID));
- // We always look first in the current directory when searching for libraries.
+ // We always look first in the current directory when searching for
+ // libraries.
LibPaths.insert(LibPaths.begin(), ".");
// If the user specified an extra search path in their environment, respect
OpenPOWER on IntegriCloud