Fix a UAF when verbose-llvm-ir is specified

The g->module is long gone when codegen_link is called.
This commit is contained in:
LemonBoy 2020-02-12 23:10:08 +01:00
parent ab4ea5d3cf
commit 327d40e7a3

View File

@ -2642,13 +2642,6 @@ void codegen_link(CodeGen *g) {
lj.rpath_table.init(4);
lj.codegen = g;
if (g->verbose_llvm_ir) {
fprintf(stderr, "\nOptimization:\n");
fprintf(stderr, "---------------\n");
fflush(stderr);
LLVMDumpModule(g->module);
}
if (g->out_type == OutTypeObj) {
lj.args.append("-r");
}