]> granicus.if.org Git - llvm/commitdiff
Actually remove the Mangler from the AsmPrinter and clean up the places it was "used...
authorEric Christopher <echristo@gmail.com>
Fri, 16 Sep 2016 17:07:23 +0000 (17:07 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 16 Sep 2016 17:07:23 +0000 (17:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281749 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/Target/Lanai/LanaiAsmPrinter.cpp
lib/Target/Lanai/LanaiMCInstLower.cpp
lib/Target/Lanai/LanaiMCInstLower.h
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/XCore/XCoreAsmPrinter.cpp
lib/Target/XCore/XCoreMCInstLower.cpp
lib/Target/XCore/XCoreMCInstLower.h

index de618d17357339bd9201b2c41e657043a92ea7a0..e2cf1989b723a36a772c7f9fb830ae239728b6cb 100644 (file)
@@ -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().
   ///
index 9d39cef9f8ed7668fadc3b8a3d114fb1815798c6..35bf5144de92bfed9a2212f4984dc321b6ead49b 100644 (file)
@@ -151,7 +151,7 @@ void LanaiAsmPrinter::emitCallInstruction(const MachineInstr *MI) {
   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::emitCallInstruction(const MachineInstr *MI) {
 }
 
 void LanaiAsmPrinter::customEmitInstruction(const MachineInstr *MI) {
-  LanaiMCInstLower MCInstLowering(OutContext, *Mang, *this);
+  LanaiMCInstLower MCInstLowering(OutContext, *this);
   MCSubtargetInfo STI = getSubtargetInfo();
   MCInst TmpInst;
   MCInstLowering.Lower(MI, TmpInst);
index 6c809b43f7ed50ec217642836ece419a3d117d68..39c633578d4331386cf0bad9bd10260ea4c8221b 100644 (file)
@@ -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"
index 41c0766e86dab7e76eace29d8b95ecd7db01ddcb..6d7818d63d875bd2c3321411a5108db8e034ae06 100644 (file)
@@ -31,8 +31,7 @@ class LLVM_LIBRARY_VISIBILITY LanaiMCInstLower {
   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;
index b975f2719d40aeeafa254e877993f97e418eb970..c5602d5d45dd8fa57d5caf4cd26e862068b9ef66 100644 (file)
@@ -848,8 +848,6 @@ bool NVPTXAsmPrinter::doInitialization(Module &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());
index 2c1bbeddedf72a38435e961987ba8562c3774f27..2c23600b00a208dd4596d3d560470769883e5403 100644 (file)
@@ -171,7 +171,7 @@ void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
 }
 
 void XCoreAsmPrinter::EmitFunctionBodyStart() {
-  MCInstLowering.Initialize(Mang, &MF->getContext());
+  MCInstLowering.Initialize(&MF->getContext());
 }
 
 /// EmitFunctionBodyEnd - Targets can override this to emit stuff after
index 03c5fa2e9c42e4e149ecdae0e2626b50d64ba613..7763ccc8f4af81bcea17bd253fb7004f7d160093 100644 (file)
 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,
index 569147872f23a8d30b85e608560811b6f2c560e4..8fb1593cc6e6a224dbdd3ff02b52feab756caa09 100644 (file)
@@ -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;