diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 93b4a50ef86d7..b3d7185e7f144 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -733,8 +733,8 @@ static int compileModule(char **argv, LLVMContext &Context) { reportError("target does not support generation of this file type"); } - const_cast(Target->getObjFileLowering()) - ->Initialize(MMIWP->getMMI().getContext(), *Target); + Target->getObjFileLowering()->Initialize(MMIWP->getMMI().getContext(), + *Target); if (MIR) { assert(MMIWP && "Forgot to create MMIWP?"); if (MIR->parseMachineFunctions(*M, MMIWP->getMMI()))