Skip to content

Commit e874615

Browse files
[llc] Remove an unnecessary cast (NFC) (#151085)
getObjFileLowering() already returns TargetLoweringObjectFile *.
1 parent 5e150bb commit e874615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/tools/llc/llc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
733733
reportError("target does not support generation of this file type");
734734
}
735735

736-
const_cast<TargetLoweringObjectFile *>(Target->getObjFileLowering())
737-
->Initialize(MMIWP->getMMI().getContext(), *Target);
736+
Target->getObjFileLowering()->Initialize(MMIWP->getMMI().getContext(),
737+
*Target);
738738
if (MIR) {
739739
assert(MMIWP && "Forgot to create MMIWP?");
740740
if (MIR->parseMachineFunctions(*M, MMIWP->getMMI()))

0 commit comments

Comments
 (0)