From: Chris Lattner Date: Mon, 23 Jan 2006 23:47:53 +0000 (+0000) Subject: Print file-scope inline asm blocks at the start of the output file. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c1b1597f244c836771b4f2668c0ae399d32a5e9;p=oota-llvm.git Print file-scope inline asm blocks at the start of the output file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25565 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 377f0d82e38..10ced4e24be 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -71,6 +71,11 @@ void AsmPrinter::SwitchSection(const char *NewSection, const GlobalValue *GV) { 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; }