[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 23 15:48:05 PST 2006



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.37 -> 1.38
---
Log message:

Print file-scope inline asm blocks at the start of the output file.


---
Diffs of the changes:  (+5 -0)

 AsmPrinter.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.37 llvm/lib/CodeGen/AsmPrinter.cpp:1.38
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.37	Thu Jan 12 13:17:23 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Mon Jan 23 17:47:53 2006
@@ -71,6 +71,11 @@
 
 bool AsmPrinter::doInitialization(Module &M) {
   Mang = new Mangler(M, GlobalPrefix);
+  
+  if (!M.getInlineAsm().empty())
+    O << CommentString << " Start File Scope Asm Blocks:\n" << M.getInlineAsm()
+      << "\n" << CommentString << " End File Scope Asm Blocks\n";
+
   SwitchSection("", 0);   // Reset back to no section.
   return false;
 }






More information about the llvm-commits mailing list