forked from OSchip/llvm-project
add a new hook to allow targets to splat stuff at the end of the file.
Overriding doFinalization is pretty lame. llvm-svn: 82268
This commit is contained in:
parent
5e9a5c3664
commit
71a15b1316
|
@ -169,6 +169,10 @@ namespace llvm {
|
|||
/// call this implementation.
|
||||
bool doInitialization(Module &M);
|
||||
|
||||
/// EmitEndOfAsmFile - This virtual method can be overridden by targets that
|
||||
/// want to emit something at the end of their file.
|
||||
virtual void EmitEndOfAsmFile(Module &M) {}
|
||||
|
||||
/// doFinalization - Shut down the asmprinter. If you override this in your
|
||||
/// pass, you must make sure to call it explicitly.
|
||||
bool doFinalization(Module &M);
|
||||
|
|
|
@ -208,6 +208,11 @@ bool AsmPrinter::doFinalization(Module &M) {
|
|||
if (MAI->getNonexecutableStackDirective())
|
||||
O << MAI->getNonexecutableStackDirective() << '\n';
|
||||
|
||||
|
||||
// Allow the target to emit any magic that it wants at the end of the file,
|
||||
// after everything else has gone out.
|
||||
EmitEndOfAsmFile(M);
|
||||
|
||||
delete Mang; Mang = 0;
|
||||
DW = 0; MMI = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue