OSDN Git Service

[NFC] remove unneeded TargetLoweringObjectFile init after 85c30f3374d9
authorYuanfang Chen <yuanfang.chen@sony.com>
Tue, 7 Jul 2020 16:39:55 +0000 (09:39 -0700)
committerYuanfang Chen <yuanfang.chen@sony.com>
Mon, 20 Jul 2020 17:43:28 +0000 (10:43 -0700)
llvm/lib/CodeGen/LLVMTargetMachine.cpp

index b485f2c..e94b7ed 100644 (file)
@@ -196,18 +196,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(
   if (!PassConfig)
     return true;
 
-  if (!TargetPassConfig::willCompleteCodeGenPipeline()) {
-    if (this->getTargetTriple().isOSAIX()) {
-      // On AIX, we might manifest MCSymbols during SDAG lowering. For MIR
-      // testing to be meaningful, we need to ensure that the symbols created
-      // are MCSymbolXCOFF variants, which requires that
-      // the TargetLoweringObjectFile instance has been initialized.
-      MCContext &Ctx = MMIWP->getMMI().getContext();
-      const_cast<TargetLoweringObjectFile &>(*this->getObjFileLowering())
-          .Initialize(Ctx, *this);
-    }
+  if (!TargetPassConfig::willCompleteCodeGenPipeline())
     PM.add(createPrintMIRPass(Out));
-  else if (addAsmPrinter(PM, Out, DwoOut, FileType,
+  else if (addAsmPrinter(PM, Out, DwoOut, FileType,
                            MMIWP->getMMI().getContext()))
     return true;