[llvm] r281749 - Actually remove the Mangler from the AsmPrinter and clean up the places it was "used" but not used.
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 16 10:07:23 PDT 2016
Author: echristo
Date: Fri Sep 16 12:07:23 2016
New Revision: 281749
URL: http://llvm.org/viewvc/llvm-project?rev=281749&view=rev
Log:
Actually remove the Mangler from the AsmPrinter and clean up the places it was "used" but not used.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp
llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.cpp
llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.h
llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
llvm/trunk/lib/Target/XCore/XCoreMCInstLower.cpp
llvm/trunk/lib/Target/XCore/XCoreMCInstLower.h
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Fri Sep 16 12:07:23 2016
@@ -89,10 +89,6 @@ public:
/// This is a pointer to the current MachineModuleInfo.
MachineModuleInfo *MMI;
- /// Name-mangler for global names.
- ///
- Mangler *Mang;
-
/// The symbol for the current function. This is recalculated at the beginning
/// of each call to runOnMachineFunction().
///
Modified: llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiAsmPrinter.cpp Fri Sep 16 12:07:23 2016
@@ -151,7 +151,7 @@ void LanaiAsmPrinter::emitCallInstructio
assert((MI->getOpcode() == Lanai::CALL || MI->getOpcode() == Lanai::CALLR) &&
"Unsupported call function");
- LanaiMCInstLower MCInstLowering(OutContext, *Mang, *this);
+ LanaiMCInstLower MCInstLowering(OutContext, *this);
MCSubtargetInfo STI = getSubtargetInfo();
// Insert save rca instruction immediately before the call.
// TODO: We should generate a pc-relative mov instruction here instead
@@ -188,7 +188,7 @@ void LanaiAsmPrinter::emitCallInstructio
}
void LanaiAsmPrinter::customEmitInstruction(const MachineInstr *MI) {
- LanaiMCInstLower MCInstLowering(OutContext, *Mang, *this);
+ LanaiMCInstLower MCInstLowering(OutContext, *this);
MCSubtargetInfo STI = getSubtargetInfo();
MCInst TmpInst;
MCInstLowering.Lower(MI, TmpInst);
Modified: llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.cpp?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.cpp Fri Sep 16 12:07:23 2016
@@ -21,7 +21,6 @@
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/IR/Constants.h"
-#include "llvm/IR/Mangler.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
Modified: llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.h?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.h (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiMCInstLower.h Fri Sep 16 12:07:23 2016
@@ -31,8 +31,7 @@ class LLVM_LIBRARY_VISIBILITY LanaiMCIns
AsmPrinter &Printer;
public:
- LanaiMCInstLower(MCContext &CTX, Mangler & /*Mang*/, AsmPrinter &AP)
- : Ctx(CTX), Printer(AP) {}
+ LanaiMCInstLower(MCContext &CTX, AsmPrinter &AP) : Ctx(CTX), Printer(AP) {}
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp Fri Sep 16 12:07:23 2016
@@ -848,8 +848,6 @@ bool NVPTXAsmPrinter::doInitialization(M
const_cast<TargetLoweringObjectFile &>(getObjFileLowering())
.Initialize(OutContext, TM);
- Mang = new Mangler();
-
// Emit header before any dwarf directives are emitted below.
emitHeader(M, OS1, STI);
OutStreamer->EmitRawText(OS1.str());
Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Fri Sep 16 12:07:23 2016
@@ -171,7 +171,7 @@ void XCoreAsmPrinter::EmitGlobalVariable
}
void XCoreAsmPrinter::EmitFunctionBodyStart() {
- MCInstLowering.Initialize(Mang, &MF->getContext());
+ MCInstLowering.Initialize(&MF->getContext());
}
/// EmitFunctionBodyEnd - Targets can override this to emit stuff after
Modified: llvm/trunk/lib/Target/XCore/XCoreMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMCInstLower.cpp?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreMCInstLower.cpp Fri Sep 16 12:07:23 2016
@@ -25,12 +25,9 @@
using namespace llvm;
XCoreMCInstLower::XCoreMCInstLower(class AsmPrinter &asmprinter)
-: Printer(asmprinter) {}
+ : Printer(asmprinter) {}
-void XCoreMCInstLower::Initialize(Mangler *M, MCContext *C) {
- Mang = M;
- Ctx = C;
-}
+void XCoreMCInstLower::Initialize(MCContext *C) { Ctx = C; }
MCOperand XCoreMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
MachineOperandType MOTy,
Modified: llvm/trunk/lib/Target/XCore/XCoreMCInstLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMCInstLower.h?rev=281749&r1=281748&r2=281749&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreMCInstLower.h (original)
+++ llvm/trunk/lib/Target/XCore/XCoreMCInstLower.h Fri Sep 16 12:07:23 2016
@@ -25,11 +25,10 @@ namespace llvm {
class LLVM_LIBRARY_VISIBILITY XCoreMCInstLower {
typedef MachineOperand::MachineOperandType MachineOperandType;
MCContext *Ctx;
- Mangler *Mang;
AsmPrinter &Printer;
public:
XCoreMCInstLower(class AsmPrinter &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;
More information about the llvm-commits
mailing list