From 83e43ca1b65c18afa3afd596938f9ff05e1084f9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 19 Oct 2009 21:45:31 +0000 Subject: [PATCH] pass mangler in as a reference instead of a pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84540 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 10 +++++----- lib/Target/X86/AsmPrinter/X86MCInstLower.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 5ccddf57e7a..252f1c58f1d 100644 --- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -59,7 +59,7 @@ GetGlobalAddressSymbol(const MachineOperand &MO) const { isImplicitlyPrivate = true; SmallString<128> Name; - Mang->getNameWithPrefix(Name, GV, isImplicitlyPrivate); + Mang.getNameWithPrefix(Name, GV, isImplicitlyPrivate); if (getSubtarget().isTargetCygMing()) { X86COFFMachineModuleInfo &COFFMMI = @@ -86,7 +86,7 @@ GetGlobalAddressSymbol(const MachineOperand &MO) const { const MCSymbol *&StubSym = getMachOMMI().getGVStubEntry(Sym); if (StubSym == 0) { Name.clear(); - Mang->getNameWithPrefix(Name, GV, false); + Mang.getNameWithPrefix(Name, GV, false); StubSym = Ctx.GetOrCreateSymbol(Name.str()); } return Sym; @@ -97,7 +97,7 @@ GetGlobalAddressSymbol(const MachineOperand &MO) const { const MCSymbol *&StubSym = getMachOMMI().getHiddenGVStubEntry(Sym); if (StubSym == 0) { Name.clear(); - Mang->getNameWithPrefix(Name, GV, false); + Mang.getNameWithPrefix(Name, GV, false); StubSym = Ctx.GetOrCreateSymbol(Name.str()); } return Sym; @@ -108,7 +108,7 @@ GetGlobalAddressSymbol(const MachineOperand &MO) const { const MCSymbol *&StubSym = getMachOMMI().getFnStubEntry(Sym); if (StubSym == 0) { Name.clear(); - Mang->getNameWithPrefix(Name, GV, false); + Mang.getNameWithPrefix(Name, GV, false); StubSym = Ctx.GetOrCreateSymbol(Name.str()); } return Sym; @@ -393,7 +393,7 @@ void X86MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { void X86AsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) { - X86MCInstLower MCInstLowering(OutContext, Mang, *this); + X86MCInstLower MCInstLowering(OutContext, *Mang, *this); switch (MI->getOpcode()) { case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.h b/lib/Target/X86/AsmPrinter/X86MCInstLower.h index fa25b906d54..42442d0a258 100644 --- a/lib/Target/X86/AsmPrinter/X86MCInstLower.h +++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.h @@ -27,12 +27,12 @@ namespace llvm { /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst. class VISIBILITY_HIDDEN X86MCInstLower { MCContext &Ctx; - Mangler *Mang; + Mangler &Mang; X86AsmPrinter &AsmPrinter; const X86Subtarget &getSubtarget() const; public: - X86MCInstLower(MCContext &ctx, Mangler *mang, X86AsmPrinter &asmprinter) + X86MCInstLower(MCContext &ctx, Mangler &mang, X86AsmPrinter &asmprinter) : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {} void Lower(const MachineInstr *MI, MCInst &OutMI) const; -- 2.34.1