cgen: show the original malloc call on a detected leak
parent
1bf7d968f9
commit
f29ca6b8df
|
@ -33,6 +33,10 @@ fn (mut g Gen) process_fn_decl(node ast.FnDecl) {
|
||||||
if !g.is_used_by_main(node) {
|
if !g.is_used_by_main(node) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if g.is_builtin_mod && g.pref.gc_mode == .boehm_leak && node.name == 'malloc' {
|
||||||
|
g.definitions.write_string('#define v_malloc GC_MALLOC\n')
|
||||||
|
return
|
||||||
|
}
|
||||||
g.gen_attrs(node.attrs)
|
g.gen_attrs(node.attrs)
|
||||||
// g.tmp_count = 0 TODO
|
// g.tmp_count = 0 TODO
|
||||||
mut skip := false
|
mut skip := false
|
||||||
|
|
Loading…
Reference in New Issue