[PATCH] Bug 9761: EmitEndOfAsmFile is not the final emission point.
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Apr 5 15:05:24 PDT 2013
MCStreamer::Finish() implementations add more code after the EmitEndOfAsmFile, which shouldn't happen, so move this after the Finish
http://llvm-reviews.chandlerc.com/D633
Files:
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -939,14 +939,15 @@
if (const MCSection *S = MAI->getNonexecutableStackSection(OutContext))
OutStreamer.SwitchSection(S);
- // 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;
MMI = 0;
OutStreamer.Finish();
+
+ // Allow the target to emit any magic that it wants at the end of the file,
+ // after everything else has gone out.
+ EmitEndOfAsmFile(M);
+
OutStreamer.reset();
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D633.1.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130405/e9c4dee3/attachment.bin>
More information about the llvm-commits
mailing list