summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-23 23:47:53 +0000
committerChris Lattner <sabre@nondot.org>2006-01-23 23:47:53 +0000
commite3a79268a2facb9bcb79ce63c99e6469f36a0dd9 (patch)
treea482609e01e0891ad6fc1746f0156428c7c9614e /llvm
parentbc7b2581cb34bca623b2525e2efdf9a1261d8888 (diff)
downloadbcm5719-llvm-e3a79268a2facb9bcb79ce63c99e6469f36a0dd9.tar.gz
bcm5719-llvm-e3a79268a2facb9bcb79ce63c99e6469f36a0dd9.zip
Print file-scope inline asm blocks at the start of the output file.
llvm-svn: 25565
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 377f0d82e38..10ced4e24be 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud