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

llvm-svn: 25565
This commit is contained in:
Chris Lattner 2006-01-23 23:47:53 +00:00
parent bc7b2581cb
commit e3a79268a2
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}