// Add an appropriate TargetData instance for this module...
addPass(Passes, new TargetData("gccld", M));
// 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...
if (!DisableOptimizations) {
// Linking modules together can lead to duplicated global constants, only
// keep one copy of each constant...
if (Strip)
addPass(Passes, createSymbolStrippingPass());
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
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