Skip to content

Commit efcb8a1

Browse files
author
Yuanfang Chen
committed
[NFC] remove unneeded TargetLoweringObjectFile init after 85c30f3
1 parent 589c646 commit efcb8a1

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

llvm/lib/CodeGen/LLVMTargetMachine.cpp

+2-11
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(
196196
if (!PassConfig)
197197
return true;
198198

199-
if (!TargetPassConfig::willCompleteCodeGenPipeline()) {
200-
if (this->getTargetTriple().isOSAIX()) {
201-
// On AIX, we might manifest MCSymbols during SDAG lowering. For MIR
202-
// testing to be meaningful, we need to ensure that the symbols created
203-
// are MCSymbolXCOFF variants, which requires that
204-
// the TargetLoweringObjectFile instance has been initialized.
205-
MCContext &Ctx = MMIWP->getMMI().getContext();
206-
const_cast<TargetLoweringObjectFile &>(*this->getObjFileLowering())
207-
.Initialize(Ctx, *this);
208-
}
199+
if (!TargetPassConfig::willCompleteCodeGenPipeline())
209200
PM.add(createPrintMIRPass(Out));
210-
} else if (addAsmPrinter(PM, Out, DwoOut, FileType,
201+
else if (addAsmPrinter(PM, Out, DwoOut, FileType,
211202
MMIWP->getMMI().getContext()))
212203
return true;
213204

0 commit comments

Comments
 (0)