[PPCInstPrinter] Delete an unneeded overload of printBranchOperand. NFC

It was added by D76591 for migration purposes (not all
printBranchOperand users have migrated to the overload with `uint64_t Address`).
Now that all have been migrated, the parameter can go away.
This commit is contained in:
Fangrui Song 2020-04-01 22:40:56 -07:00
parent 85adce3d73
commit cbd3969e8c
2 changed files with 3 additions and 7 deletions

View File

@ -414,12 +414,11 @@ void PPCInstPrinter::printU16ImmOperand(const MCInst *MI, unsigned OpNo,
} }
void PPCInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address, void PPCInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address,
unsigned OpNo, raw_ostream &O, unsigned OpNo, raw_ostream &O) {
bool RelativeForm) {
if (!MI->getOperand(OpNo).isImm()) if (!MI->getOperand(OpNo).isImm())
return printOperand(MI, OpNo, O); return printOperand(MI, OpNo, O);
int32_t Imm = SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2); int32_t Imm = SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2);
if (PrintBranchImmAsAddress && !RelativeForm) { if (PrintBranchImmAsAddress) {
uint64_t Target = Address + Imm; uint64_t Target = Address + Imm;
if (!TT.isPPC64()) if (!TT.isPPC64())
Target &= 0xffffffff; Target &= 0xffffffff;

View File

@ -65,10 +65,7 @@ public:
void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
void printImmZeroOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printImmZeroOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
void printBranchOperand(const MCInst *MI, uint64_t Address, unsigned OpNo, void printBranchOperand(const MCInst *MI, uint64_t Address, unsigned OpNo,
raw_ostream &O, bool RelativeForm = false); raw_ostream &O);
void printBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
printBranchOperand(MI, 0, OpNo, O, true);
}
void printAbsBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printAbsBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
void printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O); void printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O);