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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user