[llvm] r193617 - The AsmPrinter has a Mangler. Use it.
Rafael Espindola
rafael.espindola at gmail.com
Tue Oct 29 09:18:16 PDT 2013
Author: rafael
Date: Tue Oct 29 11:18:15 2013
New Revision: 193617
URL: http://llvm.org/viewvc/llvm-project?rev=193617&view=rev
Log:
The AsmPrinter has a Mangler. Use it.
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.cpp
llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.h
Modified: llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp?rev=193617&r1=193616&r2=193617&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp Tue Oct 29 11:18:15 2013
@@ -57,7 +57,7 @@ static MCInst lowerRIEfLow(const Machine
}
void SystemZAsmPrinter::EmitInstruction(const MachineInstr *MI) {
- SystemZMCInstLower Lower(Mang, MF->getContext(), *this);
+ SystemZMCInstLower Lower(MF->getContext(), *this);
MCInst LoweredMI;
switch (MI->getOpcode()) {
case SystemZ::Return:
@@ -178,7 +178,7 @@ bool SystemZAsmPrinter::PrintAsmOperand(
return true;
OS << -int64_t(MI->getOperand(OpNo).getImm());
} else {
- SystemZMCInstLower Lower(Mang, MF->getContext(), *this);
+ SystemZMCInstLower Lower(MF->getContext(), *this);
MCOperand MO(Lower.lowerOperand(MI->getOperand(OpNo)));
SystemZInstPrinter::printOperand(MO, OS);
}
Modified: llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.cpp?rev=193617&r1=193616&r2=193617&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.cpp Tue Oct 29 11:18:15 2013
@@ -26,9 +26,9 @@ static MCSymbolRefExpr::VariantKind getV
llvm_unreachable("Unrecognised MO_ACCESS_MODEL");
}
-SystemZMCInstLower::SystemZMCInstLower(Mangler *mang, MCContext &ctx,
+SystemZMCInstLower::SystemZMCInstLower(MCContext &ctx,
SystemZAsmPrinter &asmprinter)
- : Mang(mang), Ctx(ctx), AsmPrinter(asmprinter) {}
+ : Ctx(ctx), AsmPrinter(asmprinter) {}
const MCExpr *
SystemZMCInstLower::getExpr(const MachineOperand &MO,
@@ -42,7 +42,7 @@ SystemZMCInstLower::getExpr(const Machin
break;
case MachineOperand::MO_GlobalAddress:
- Symbol = Mang->getSymbol(MO.getGlobal());
+ Symbol = AsmPrinter.Mang->getSymbol(MO.getGlobal());
break;
case MachineOperand::MO_ExternalSymbol:
Modified: llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.h?rev=193617&r1=193616&r2=193617&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.h (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZMCInstLower.h Tue Oct 29 11:18:15 2013
@@ -23,13 +23,11 @@ class Mangler;
class SystemZAsmPrinter;
class LLVM_LIBRARY_VISIBILITY SystemZMCInstLower {
- Mangler *Mang;
MCContext &Ctx;
SystemZAsmPrinter &AsmPrinter;
public:
- SystemZMCInstLower(Mangler *mang, MCContext &ctx,
- SystemZAsmPrinter &asmPrinter);
+ SystemZMCInstLower(MCContext &ctx, SystemZAsmPrinter &asmPrinter);
// Lower MachineInstr MI to MCInst OutMI.
void lower(const MachineInstr *MI, MCInst &OutMI) const;
More information about the llvm-commits
mailing list