[PPCInstPrinter] Delete an unneeded overload of printBranchOperand. NFC
authorFangrui Song <maskray@google.com>
Thu, 2 Apr 2020 05:40:56 +0000 (22:40 -0700)
committerFangrui Song <maskray@google.com>
Thu, 2 Apr 2020 05:45:25 +0000 (22:45 -0700)
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.

llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h

index 743bbd9..60558a6 100644 (file)
@@ -414,12 +414,11 @@ void PPCInstPrinter::printU16ImmOperand(const MCInst *MI, unsigned OpNo,
 }
 
 void PPCInstPrinter::printBranchOperand(const MCInst *MI, uint64_t Address,
-                                        unsigned OpNo, raw_ostream &O,
-                                        bool RelativeForm) {
+                                        unsigned OpNo, raw_ostream &O) {
   if (!MI->getOperand(OpNo).isImm())
     return printOperand(MI, OpNo, O);
   int32_t Imm = SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2);
-  if (PrintBranchImmAsAddress && !RelativeForm) {
+  if (PrintBranchImmAsAddress) {
     uint64_t Target = Address + Imm;
     if (!TT.isPPC64())
       Target &= 0xffffffff;
index 95fbb5a..9763aec 100644 (file)
@@ -65,10 +65,7 @@ public:
   void printU16ImmOperand(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,
-                          raw_ostream &O, bool RelativeForm = false);
-  void printBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
-    printBranchOperand(MI, 0, OpNo, O, true);
-  }
+                          raw_ostream &O);
   void printAbsBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
   void printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O);