diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-04 18:14:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 18:14:01 +0000 |
commit | 4a4710a055300a788e287125ece086b1785ef6b8 (patch) | |
tree | b4b2efddf766a8206b1a0bc0c1840941ccee4585 /llvm/lib | |
parent | 21dc46e2561284602e04b05810b9c486556603ba (diff) | |
download | bcm5719-llvm-4a4710a055300a788e287125ece086b1785ef6b8.tar.gz bcm5719-llvm-4a4710a055300a788e287125ece086b1785ef6b8.zip |
clean up the asmprinter interface a bit, rename a few
"Print" methods to "Emit". Emit is something that goes
to an mc streamer, Print is something that goes to a
raw_ostream (for inline asm)
llvm-svn: 100337
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 2a8e3eee459..e8b6ff40c97 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -440,16 +440,16 @@ void AsmPrinter::EmitFunctionBody() { case TargetOpcode::DBG_LABEL: case TargetOpcode::EH_LABEL: case TargetOpcode::GC_LABEL: - printLabelInst(II); + OutStreamer.EmitLabel(II->getOperand(0).getMCSymbol()); break; case TargetOpcode::INLINEASM: - printInlineAsm(II); + EmitInlineAsm(II); break; case TargetOpcode::IMPLICIT_DEF: - printImplicitDef(II); + EmitImplicitDef(II); break; case TargetOpcode::KILL: - printKill(II); + EmitKill(II); break; default: EmitInstruction(II); @@ -1385,9 +1385,9 @@ void AsmPrinter::processDebugLoc(const MachineInstr *MI, } -/// printInlineAsm - This method formats and prints the specified machine +/// EmitInlineAsm - This method formats and emits the specified machine /// instruction that is an inline asm. -void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { +void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const { assert(MI->isInlineAsm() && "printInlineAsm only works on inline asms"); unsigned NumOperands = MI->getNumOperands(); @@ -1606,9 +1606,9 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { MAI->getInlineAsmEnd()); } -/// printImplicitDef - This method prints the specified machine instruction +/// EmitImplicitDef - This method emits the specified machine instruction /// that is an implicit def. -void AsmPrinter::printImplicitDef(const MachineInstr *MI) const { +void AsmPrinter::EmitImplicitDef(const MachineInstr *MI) const { if (!VerboseAsm) return; unsigned RegNo = MI->getOperand(0).getReg(); OutStreamer.AddComment(Twine("implicit-def: ") + @@ -1616,7 +1616,7 @@ void AsmPrinter::printImplicitDef(const MachineInstr *MI) const { OutStreamer.AddBlankLine(); } -void AsmPrinter::printKill(const MachineInstr *MI) const { +void AsmPrinter::EmitKill(const MachineInstr *MI) const { if (!VerboseAsm) return; std::string Str = "kill:"; @@ -1631,12 +1631,6 @@ void AsmPrinter::printKill(const MachineInstr *MI) const { OutStreamer.AddBlankLine(); } -/// printLabel - This method prints a local label used by debug and -/// exception handling tables. -void AsmPrinter::printLabelInst(const MachineInstr *MI) const { - OutStreamer.EmitLabel(MI->getOperand(0).getMCSymbol()); -} - /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM /// instruction, using the specified assembler variant. Targets should /// override this to format as appropriate. |