From: Eric Christopher Date: Sat, 1 Oct 2016 01:50:25 +0000 (+0000) Subject: Remove TargetTriple from AArch64MCInstLower as it's used in few places X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76315dae175c71f84b4323fca5c67b0cfed60ffd;p=llvm Remove TargetTriple from AArch64MCInstLower as it's used in few places and can be pulled from the TargetMachine. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283000 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64MCInstLower.cpp b/lib/Target/AArch64/AArch64MCInstLower.cpp index 2b4cdf1083b..45083df7ab4 100644 --- a/lib/Target/AArch64/AArch64MCInstLower.cpp +++ b/lib/Target/AArch64/AArch64MCInstLower.cpp @@ -29,7 +29,7 @@ using namespace llvm; extern cl::opt EnableAArch64ELFLocalDynamicTLSGeneration; AArch64MCInstLower::AArch64MCInstLower(MCContext &ctx, AsmPrinter &printer) - : Ctx(ctx), Printer(printer), TargetTriple(printer.getTargetTriple()) {} + : Ctx(ctx), Printer(printer) {} MCSymbol * AArch64MCInstLower::GetGlobalAddressSymbol(const MachineOperand &MO) const { @@ -153,10 +153,11 @@ MCOperand AArch64MCInstLower::lowerSymbolOperandELF(const MachineOperand &MO, MCOperand AArch64MCInstLower::LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const { - if (TargetTriple.isOSDarwin()) + if (Printer.TM.getTargetTriple().isOSDarwin()) return lowerSymbolOperandDarwin(MO, Sym); - assert(TargetTriple.isOSBinFormatELF() && "Expect Darwin or ELF target"); + assert(Printer.TM.getTargetTriple().isOSBinFormatELF() && + "Expect Darwin or ELF target"); return lowerSymbolOperandELF(MO, Sym); }