From b11a191088d2dd942a20cb41fc71f3f8374c5289 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Wed, 13 May 2015 20:28:41 +0000 Subject: [PATCH] ARM: remove possible vestiges of the legacy JIT??? There's no need to manually pass modifier strings around to tell an operand how to print now, that information is encoded in the operand itself since the MC layer came along. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237295 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMAsmPrinter.cpp | 14 +++++--------- lib/Target/ARM/ARMAsmPrinter.h | 3 +-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 9dfe2b62383..1c8d52046cf 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -144,7 +144,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) { } void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum, - raw_ostream &O, const char *Modifier) { + raw_ostream &O) { const MachineOperand &MO = MI->getOperand(OpNum); unsigned TF = MO.getTargetFlags(); @@ -165,11 +165,9 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum, case MachineOperand::MO_Immediate: { int64_t Imm = MO.getImm(); O << '#'; - if ((Modifier && strcmp(Modifier, "lo16") == 0) || - (TF == ARMII::MO_LO16)) + if (TF == ARMII::MO_LO16) O << ":lower16:"; - else if ((Modifier && strcmp(Modifier, "hi16") == 0) || - (TF == ARMII::MO_HI16)) + else if (TF == ARMII::MO_HI16) O << ":upper16:"; O << Imm; break; @@ -179,11 +177,9 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum, return; case MachineOperand::MO_GlobalAddress: { const GlobalValue *GV = MO.getGlobal(); - if ((Modifier && strcmp(Modifier, "lo16") == 0) || - (TF & ARMII::MO_LO16)) + if (TF & ARMII::MO_LO16) O << ":lower16:"; - else if ((Modifier && strcmp(Modifier, "hi16") == 0) || - (TF & ARMII::MO_HI16)) + else if (TF & ARMII::MO_HI16) O << ":upper16:"; O << *GetARMGVSymbol(GV, TF); diff --git a/lib/Target/ARM/ARMAsmPrinter.h b/lib/Target/ARM/ARMAsmPrinter.h index 2b34667f637..7bfb9447818 100644 --- a/lib/Target/ARM/ARMAsmPrinter.h +++ b/lib/Target/ARM/ARMAsmPrinter.h @@ -59,8 +59,7 @@ public: return "ARM Assembly / Object Emitter"; } - void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O, - const char *Modifier = nullptr); + void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O); bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNum, unsigned AsmVariant, const char *ExtraCode,