@@ -511,7 +511,6 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
511
511
// /
512
512
void PPCAsmPrinter::EmitInstruction (const MachineInstr *MI) {
513
513
MCInst TmpInst;
514
- bool isPPC64 = Subtarget->isPPC64 ();
515
514
bool isDarwin = TM.getTargetTriple ().isOSDarwin ();
516
515
const Module *M = MF->getFunction ().getParent ();
517
516
PICLevel::Level PL = M->getPICLevel ();
@@ -865,15 +864,15 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
865
864
LowerPPCMachineInstrToMCInst (MI, TmpInst, *this , isDarwin);
866
865
867
866
// Change the opcode to LD.
868
- TmpInst.setOpcode (isPPC64 ? PPC::LD : PPC::LWZ);
867
+ TmpInst.setOpcode (Subtarget-> isPPC64 () ? PPC::LD : PPC::LWZ);
869
868
const MachineOperand &MO = MI->getOperand (1 );
870
869
const GlobalValue *GValue = MO.getGlobal ();
871
870
MCSymbol *MOSymbol = getSymbol (GValue);
872
- const MCExpr *Exp =
873
- MCSymbolRefExpr::create ( MOSymbol,
874
- isPPC64 ? MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO
875
- : MCSymbolRefExpr::VK_PPC_GOT_TPREL,
876
- OutContext);
871
+ const MCExpr *Exp = MCSymbolRefExpr::create (
872
+ MOSymbol,
873
+ Subtarget-> isPPC64 () ? MCSymbolRefExpr::VK_PPC_GOT_TPREL_LO
874
+ : MCSymbolRefExpr::VK_PPC_GOT_TPREL,
875
+ OutContext);
877
876
TmpInst.getOperand (1 ) = MCOperand::createExpr (Exp);
878
877
EmitToStreamer (*OutStreamer, TmpInst);
879
878
return ;
0 commit comments