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

llvm-svn: 25565
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 377f0d8..10ced4e 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -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;
 }