From: Rafael Espindola Date: Tue, 29 Oct 2013 16:24:21 +0000 (+0000) Subject: The asm printer has a mangler. Use it. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a300b1cc29020b7dfaf7bfe443d38af8fbec7433;p=oota-llvm.git The asm printer has a mangler. Use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193618 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp index 680edfcaf0b..060a1c0ac3c 100644 --- a/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/MipsAsmPrinter.cpp @@ -284,7 +284,7 @@ void MipsAsmPrinter::EmitFunctionEntryLabel() { /// EmitFunctionBodyStart - Targets can override this to emit stuff before /// the first basic block in the function. void MipsAsmPrinter::EmitFunctionBodyStart() { - MCInstLowering.Initialize(Mang, &MF->getContext()); + MCInstLowering.Initialize(&MF->getContext()); bool IsNakedFunction = MF->getFunction()-> diff --git a/lib/Target/Mips/MipsMCInstLower.cpp b/lib/Target/Mips/MipsMCInstLower.cpp index d836975eb7d..f46c86af078 100644 --- a/lib/Target/Mips/MipsMCInstLower.cpp +++ b/lib/Target/Mips/MipsMCInstLower.cpp @@ -28,8 +28,7 @@ using namespace llvm; MipsMCInstLower::MipsMCInstLower(MipsAsmPrinter &asmprinter) : AsmPrinter(asmprinter) {} -void MipsMCInstLower::Initialize(Mangler *M, MCContext *C) { - Mang = M; +void MipsMCInstLower::Initialize(MCContext *C) { Ctx = C; } @@ -74,7 +73,7 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO, break; case MachineOperand::MO_GlobalAddress: - Symbol = Mang->getSymbol(MO.getGlobal()); + Symbol = AsmPrinter.Mang->getSymbol(MO.getGlobal()); Offset += MO.getOffset(); break; diff --git a/lib/Target/Mips/MipsMCInstLower.h b/lib/Target/Mips/MipsMCInstLower.h index c4a6016105b..4570bd90997 100644 --- a/lib/Target/Mips/MipsMCInstLower.h +++ b/lib/Target/Mips/MipsMCInstLower.h @@ -19,7 +19,6 @@ namespace llvm { class MCOperand; class MachineInstr; class MachineFunction; - class Mangler; class MipsAsmPrinter; /// MipsMCInstLower - This class is used to lower an MachineInstr into an @@ -27,11 +26,10 @@ namespace llvm { class LLVM_LIBRARY_VISIBILITY MipsMCInstLower { typedef MachineOperand::MachineOperandType MachineOperandType; MCContext *Ctx; - Mangler *Mang; MipsAsmPrinter &AsmPrinter; public: MipsMCInstLower(MipsAsmPrinter &asmprinter); - void Initialize(Mangler *mang, MCContext *C); + void Initialize(MCContext *C); void Lower(const MachineInstr *MI, MCInst &OutMI) const; MCOperand LowerOperand(const MachineOperand& MO, unsigned offset = 0) const;