diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index d89ee519ed694..471e2c132843c 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -2088,8 +2088,10 @@ void jl_get_llvmf_defn_impl(jl_llvmf_dump_t* dump, jl_method_instance_t *mi, siz // differ very significantly from the actual non-imaging mode code. // // Force imaging mode for names of pointers // output.imaging = true; - // Force max debug info for introspection - output.debug_level = 2; + // Force at least medium debug info for introspection + // No debug info = no variable names, + // max debug info = llvm.dbg.declare/value intrinsics which clutter IR output + output.debug_level = std::max(1, static_cast(jl_options.debug_level)); auto decls = jl_emit_code(m, mi, src, jlrettype, output); JL_UNLOCK(&jl_codegen_lock); // Might GC