[llvm] efcb8a1 - [NFC] remove unneeded TargetLoweringObjectFile init after 85c30f3374d9
Yuanfang Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 10:43:45 PDT 2020
Author: Yuanfang Chen
Date: 2020-07-20T10:43:28-07:00
New Revision: efcb8a190395ad35dcd6931b16c7b0bd1ccd37cf
URL: https://github.com/llvm/llvm-project/commit/efcb8a190395ad35dcd6931b16c7b0bd1ccd37cf
DIFF: https://github.com/llvm/llvm-project/commit/efcb8a190395ad35dcd6931b16c7b0bd1ccd37cf.diff
LOG: [NFC] remove unneeded TargetLoweringObjectFile init after 85c30f3374d9
Added:
Modified:
llvm/lib/CodeGen/LLVMTargetMachine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index b485f2cf7261..e94b7ed4de03 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -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;
More information about the llvm-commits
mailing list