diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-28 09:44:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-28 09:44:03 +0000 |
commit | 548e813fa739e6a7ac0f9d1c3e19d96012f80e75 (patch) | |
tree | 3891499a39ac3d19c41010f3473d550af8cac6d5 /tools/gccld/GenerateCode.cpp | |
parent | 6cc8ca92291c8b18d8aa88d43c50dd25d0740ca4 (diff) |
The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 2de81bc355..6fd30c8d87 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -74,6 +74,12 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) { // Add an appropriate TargetData instance for this module... addPass(Passes, new TargetData("gccld", M)); + // Often if the programmer does not specify proper prototypes for the + // functions they are calling, they end up calling a vararg version of the + // function that does not get a body filled in (the real function has typed + // arguments). This pass merges the two functions. + addPass(Passes, createFunctionResolvingPass()); + if (!DisableOptimizations) { // Linking modules together can lead to duplicated global constants, only // keep one copy of each constant... @@ -85,12 +91,6 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) { if (Strip) addPass(Passes, createSymbolStrippingPass()); - // Often if the programmer does not specify proper prototypes for the - // functions they are calling, they end up calling a vararg version of the - // function that does not get a body filled in (the real function has typed - // 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 |