summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-24 15:47:54 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-24 15:47:54 +0000
commit65fd0a8c6bcd4b63272dedc6226fc9e6be57098e (patch)
tree462df7f8ddd5b2cb044158c6d7af58d7a5e6ac21 /llvm/lib/CodeGen/AsmPrinter
parentf246033698606adeee9ee6b0622bd316473c2305 (diff)
downloadbcm5719-llvm-65fd0a8c6bcd4b63272dedc6226fc9e6be57098e.tar.gz
bcm5719-llvm-65fd0a8c6bcd4b63272dedc6226fc9e6be57098e.zip
Move emitInlineAsmEnd to the AsmPrinter interface.
There is no inline asm in a .s file. Therefore, there should be no logic to handle it in the streamer. Inline asm only exists in bitcode files, so the logic can live in the (long misnamed) AsmPrinter class. llvm-svn: 200011
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index d679bff4cb5..aece69bca63 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -84,7 +84,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
// system assembler does.
if (OutStreamer.hasRawTextSupport()) {
OutStreamer.EmitRawText(Str);
- OutStreamer.EmitInlineAsmEnd(TM.getSubtarget<MCSubtargetInfo>(), 0);
+ emitInlineAsmEnd(TM.getSubtarget<MCSubtargetInfo>(), 0);
return;
}
@@ -124,7 +124,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
const_cast<MCSubtargetInfo*>(&TM.getSubtarget<MCSubtargetInfo>());
// Preserve a copy of the original STI because the parser may modify it.
- // The target can restore the original state in EmitInlineAsmEnd().
+ // The target can restore the original state in emitInlineAsmEnd().
MCSubtargetInfo STIOrig = *STI;
OwningPtr<MCTargetAsmParser>
@@ -138,7 +138,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode,
// Don't implicitly switch to the text section before the asm.
int Res = Parser->Run(/*NoInitialTextSection*/ true,
/*NoFinalize*/ true);
- OutStreamer.EmitInlineAsmEnd(STIOrig, STI);
+ emitInlineAsmEnd(STIOrig, STI);
if (Res && !HasDiagHandler)
report_fatal_error("Error parsing inline asm\n");
}
@@ -549,3 +549,5 @@ bool AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
return true;
}
+void AsmPrinter::emitInlineAsmEnd(const MCSubtargetInfo &StartInfo,
+ MCSubtargetInfo *EndInfo) const {}
OpenPOWER on IntegriCloud