diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-23 23:47:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-23 23:47:53 +0000 |
commit | 2c1b1597f244c836771b4f2668c0ae399d32a5e9 (patch) | |
tree | aab54ff233f52b9e19e77a24556aefa6f3ecf6cb /lib/CodeGen/AsmPrinter.cpp | |
parent | 7e6db764b15007860c4384311db97cce1618705e (diff) |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 377f0d82e3..10ced4e24b 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; } |