mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
privatize a bunch of methods and move \n printing into them.
llvm-svn: 95186
This commit is contained in:
parent
dda5d34934
commit
a64be6d665
@ -307,7 +307,6 @@ namespace llvm {
|
|||||||
|
|
||||||
/// printLabel - This method prints a local label used by debug and
|
/// printLabel - This method prints a local label used by debug and
|
||||||
/// exception handling tables.
|
/// exception handling tables.
|
||||||
void printLabel(const MachineInstr *MI) const;
|
|
||||||
void printLabel(unsigned Id) const;
|
void printLabel(unsigned Id) const;
|
||||||
|
|
||||||
/// printDeclare - This method prints a local variable declaration used by
|
/// printDeclare - This method prints a local variable declaration used by
|
||||||
@ -366,10 +365,17 @@ namespace llvm {
|
|||||||
|
|
||||||
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);
|
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);
|
||||||
|
|
||||||
|
/// printOffset - This is just convenient handler for printing offsets.
|
||||||
|
void printOffset(int64_t Offset) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
/// processDebugLoc - Processes the debug information of each machine
|
/// processDebugLoc - Processes the debug information of each machine
|
||||||
/// instruction's DebugLoc.
|
/// instruction's DebugLoc.
|
||||||
void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn);
|
void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn);
|
||||||
|
|
||||||
|
void printLabelInst(const MachineInstr *MI) const;
|
||||||
|
|
||||||
/// printInlineAsm - This method formats and prints the specified machine
|
/// printInlineAsm - This method formats and prints the specified machine
|
||||||
/// instruction that is an inline asm.
|
/// instruction that is an inline asm.
|
||||||
void printInlineAsm(const MachineInstr *MI) const;
|
void printInlineAsm(const MachineInstr *MI) const;
|
||||||
@ -381,10 +387,6 @@ namespace llvm {
|
|||||||
/// printKill - This method prints the specified kill machine instruction.
|
/// printKill - This method prints the specified kill machine instruction.
|
||||||
void printKill(const MachineInstr *MI) const;
|
void printKill(const MachineInstr *MI) const;
|
||||||
|
|
||||||
/// printOffset - This is just convenient handler for printing offsets.
|
|
||||||
void printOffset(int64_t Offset) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// EmitVisibility - This emits visibility information about symbol, if
|
/// EmitVisibility - This emits visibility information about symbol, if
|
||||||
/// this is suported by the target.
|
/// this is suported by the target.
|
||||||
void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const;
|
void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const;
|
||||||
|
@ -350,20 +350,16 @@ void AsmPrinter::EmitFunctionBody() {
|
|||||||
case TargetInstrInfo::DBG_LABEL:
|
case TargetInstrInfo::DBG_LABEL:
|
||||||
case TargetInstrInfo::EH_LABEL:
|
case TargetInstrInfo::EH_LABEL:
|
||||||
case TargetInstrInfo::GC_LABEL:
|
case TargetInstrInfo::GC_LABEL:
|
||||||
printLabel(II);
|
printLabelInst(II);
|
||||||
O << '\n';
|
|
||||||
break;
|
break;
|
||||||
case TargetInstrInfo::INLINEASM:
|
case TargetInstrInfo::INLINEASM:
|
||||||
printInlineAsm(II);
|
printInlineAsm(II);
|
||||||
O << '\n';
|
|
||||||
break;
|
break;
|
||||||
case TargetInstrInfo::IMPLICIT_DEF:
|
case TargetInstrInfo::IMPLICIT_DEF:
|
||||||
printImplicitDef(II);
|
printImplicitDef(II);
|
||||||
O << '\n';
|
|
||||||
break;
|
break;
|
||||||
case TargetInstrInfo::KILL:
|
case TargetInstrInfo::KILL:
|
||||||
printKill(II);
|
printKill(II);
|
||||||
O << '\n';
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
EmitInstruction(II);
|
EmitInstruction(II);
|
||||||
@ -1429,7 +1425,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd();
|
O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd() << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// printImplicitDef - This method prints the specified machine instruction
|
/// printImplicitDef - This method prints the specified machine instruction
|
||||||
@ -1438,7 +1434,7 @@ void AsmPrinter::printImplicitDef(const MachineInstr *MI) const {
|
|||||||
if (!VerboseAsm) return;
|
if (!VerboseAsm) return;
|
||||||
O.PadToColumn(MAI->getCommentColumn());
|
O.PadToColumn(MAI->getCommentColumn());
|
||||||
O << MAI->getCommentString() << " implicit-def: "
|
O << MAI->getCommentString() << " implicit-def: "
|
||||||
<< TRI->getName(MI->getOperand(0).getReg());
|
<< TRI->getName(MI->getOperand(0).getReg()) << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsmPrinter::printKill(const MachineInstr *MI) const {
|
void AsmPrinter::printKill(const MachineInstr *MI) const {
|
||||||
@ -1450,12 +1446,14 @@ void AsmPrinter::printKill(const MachineInstr *MI) const {
|
|||||||
assert(op.isReg() && "KILL instruction must have only register operands");
|
assert(op.isReg() && "KILL instruction must have only register operands");
|
||||||
O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "<def>" : "<kill>");
|
O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "<def>" : "<kill>");
|
||||||
}
|
}
|
||||||
|
O << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// printLabel - This method prints a local label used by debug and
|
/// printLabel - This method prints a local label used by debug and
|
||||||
/// exception handling tables.
|
/// exception handling tables.
|
||||||
void AsmPrinter::printLabel(const MachineInstr *MI) const {
|
void AsmPrinter::printLabelInst(const MachineInstr *MI) const {
|
||||||
printLabel(MI->getOperand(0).getImm());
|
printLabel(MI->getOperand(0).getImm());
|
||||||
|
O << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsmPrinter::printLabel(unsigned Id) const {
|
void AsmPrinter::printLabel(unsigned Id) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user