diff options
| author | gingerBill <bill@gingerbill.org> | 2018-02-05 22:26:22 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-02-05 22:26:22 +0000 |
| commit | 2891988d3bd04c173f79eb462d2f8dfd58d9c171 (patch) | |
| tree | 72a567c407378174bd8141573661bbcbd465ec39 | |
| parent | c1728914c63b18d52c03399fa8f90e00d454d39c (diff) | |
Add extra check to ir_emit_zero_init
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 854f7f521..8467b52fe 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1602,7 +1602,9 @@ void ir_emit_zero_init(irProcedure *p, irValue *address, AstNode *expr) { args[0] = ir_emit_conv(p, address, t_rawptr); args[1] = ir_const_int(a, type_size_of(a, t)); ir_emit(p, ir_instr_zero_init(p, address)); - ir_emit_global_call(p, "__mem_zero", args, 2, expr); + if (p->entity->token.string != "__mem_zero") { + ir_emit_global_call(p, "__mem_zero", args, 2, expr); + } } irValue *ir_emit_comment(irProcedure *p, String text) { |