mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user