@@ -924,7 +924,11 @@ static void jl_dump_asm_internal(
924924 // LLVM will destroy the formatted stream, and we keep the raw stream.
925925 std::unique_ptr<formatted_raw_ostream> ustream (new formatted_raw_ostream (rstream));
926926 std::unique_ptr<MCStreamer> Streamer (
927- #if JL_LLVM_VERSION >= 190000
927+ #if JL_LLVM_VERSION >= 210000
928+ TheTarget->createAsmStreamer (Ctx, std::move (ustream),
929+
930+ std::move (IP), std::move (CE), std::move (MAB))
931+ #elif JL_LLVM_VERSION >= 190000
928932 TheTarget->createAsmStreamer (Ctx, std::move (ustream),
929933
930934 IP.release (), std::move (CE), std::move (MAB))
@@ -1268,8 +1272,8 @@ jl_value_t *jl_dump_function_asm_impl(jl_llvmf_dump_t* dump, char emit_mc, const
12681272 OutputAsmDialect = 0 ;
12691273 if (!strcmp (asm_variant, " intel" ))
12701274 OutputAsmDialect = 1 ;
1271- MCInstPrinter * InstPrinter = TM->getTarget ().createMCInstPrinter (
1272- jl_ExecutionEngine->getTargetTriple (), OutputAsmDialect, MAI, MII, MRI);
1275+ std::unique_ptr< MCInstPrinter> InstPrinter ( TM->getTarget ().createMCInstPrinter (
1276+ jl_ExecutionEngine->getTargetTriple (), OutputAsmDialect, MAI, MII, MRI) );
12731277 std::unique_ptr<MCAsmBackend> MAB (TM->getTarget ().createMCAsmBackend (
12741278 STI, MRI, Options));
12751279 std::unique_ptr<MCCodeEmitter> MCE;
@@ -1278,8 +1282,10 @@ jl_value_t *jl_dump_function_asm_impl(jl_llvmf_dump_t* dump, char emit_mc, const
12781282 }
12791283 auto FOut = std::make_unique<formatted_raw_ostream>(asmfile);
12801284 std::unique_ptr<MCStreamer> S (TM->getTarget ().createAsmStreamer (
1281- #if JL_LLVM_VERSION >= 190000
1282- *Context, std::move (FOut), InstPrinter, std::move (MCE), std::move (MAB)
1285+ #if JL_LLVM_VERSION >= 210000
1286+ *Context, std::move (FOut), std::move (InstPrinter), std::move (MCE), std::move (MAB)
1287+ #elif JL_LLVM_VERSION >= 190000
1288+ *Context, std::move (FOut), InstPrinter.release (), std::move (MCE), std::move (MAB)
12831289#else
12841290 *Context, std::move (FOut), true , true , InstPrinter, std::move (MCE),
12851291 std::move (MAB), false
0 commit comments