[PATCH] Bug 9761: EmitEndOfAsmFile is not the final emission point.

Matt Arsenault Matthew.Arsenault at amd.com
Mon Apr 8 21:47:18 PDT 2013


http://llvm-reviews.chandlerc.com/D633

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D633?vs=1533&id=1556#toc

Files:
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -939,16 +939,18 @@
     if (const MCSection *S = MAI->getNonexecutableStackSection(OutContext))
       OutStreamer.SwitchSection(S);
 
+  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);
 
-  delete Mang; Mang = 0;
-  MMI = 0;
-
-  OutStreamer.Finish();
   OutStreamer.reset();
 
+  delete Mang;
+  Mang = 0;
+  MMI = 0;
+
   return false;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D633.2.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130408/0048e6a7/attachment.bin>


More information about the llvm-commits mailing list