mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
* The cleangcc pass is broken into two parts, we only want to
FunctionResolvingPass one. * We run it *after* the symbol stripping pass so that -strip can be pipelined with the constant merging pass or something else if desired. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6a1f6940a1
commit
f8b90ee366
@ -120,7 +120,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// In addition to just parsing the input from GCC, we also want to spiff it up
|
// In addition to just linking the input from GCC, we also want to spiff it up
|
||||||
// a little bit. Do this now.
|
// a little bit. Do this now.
|
||||||
//
|
//
|
||||||
PassManager Passes;
|
PassManager Passes;
|
||||||
@ -130,13 +130,6 @@ int main(int argc, char **argv) {
|
|||||||
//
|
//
|
||||||
Passes.add(createConstantMergePass());
|
Passes.add(createConstantMergePass());
|
||||||
|
|
||||||
// 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, among other things.
|
|
||||||
//
|
|
||||||
Passes.add(createCleanupGCCOutputPass());
|
|
||||||
|
|
||||||
// If the -s command line option was specified, strip the symbols out of the
|
// If the -s command line option was specified, strip the symbols out of the
|
||||||
// resulting program to make it smaller. -s is a GCC option that we are
|
// resulting program to make it smaller. -s is a GCC option that we are
|
||||||
// supporting.
|
// supporting.
|
||||||
@ -144,6 +137,13 @@ int main(int argc, char **argv) {
|
|||||||
if (Strip)
|
if (Strip)
|
||||||
Passes.add(createSymbolStrippingPass());
|
Passes.add(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.
|
||||||
|
//
|
||||||
|
Passes.add(createFunctionResolvingPass());
|
||||||
|
|
||||||
// Now that composite has been compiled, scan through the module, looking for
|
// Now that composite has been compiled, scan through the module, looking for
|
||||||
// a main function. If main is defined, mark all other functions internal.
|
// a main function. If main is defined, mark all other functions internal.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user