aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-10-31 00:04:15 +0000
committergingerBill <bill@gingerbill.org>2022-10-31 00:04:15 +0000
commit9da37ed394d866828cad91b83fe8674a5c3e5775 (patch)
tree254b0c61f61efca3f4a2d80142c05e5e960b6150 /src/llvm_backend_expr.cpp
parent8fa571c283dca207e9eae7b2924db3bbc9d6aa39 (diff)
Optimize `#caller_location` and `#location` to use read only data section where possible
Diffstat (limited to 'src/llvm_backend_expr.cpp')
-rw-r--r--src/llvm_backend_expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index 6c046fa4a..f26b990ff 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -4232,7 +4232,7 @@ lbAddr lb_build_addr_compound_lit(lbProcedure *p, Ast *expr) {
args[1] = size;
args[2] = align;
args[3] = lb_const_int(p->module, t_int, item_count);
- args[4] = lb_emit_source_code_location(p, proc_name, pos);
+ args[4] = lb_emit_source_code_location_as_global(p, proc_name, pos);
lb_emit_runtime_call(p, "__dynamic_array_reserve", args);
}
@@ -4253,7 +4253,7 @@ lbAddr lb_build_addr_compound_lit(lbProcedure *p, Ast *expr) {
args[2] = align;
args[3] = lb_emit_conv(p, items, t_rawptr);
args[4] = lb_const_int(p->module, t_int, item_count);
- args[5] = lb_emit_source_code_location(p, proc_name, pos);
+ args[5] = lb_emit_source_code_location_as_global(p, proc_name, pos);
lb_emit_runtime_call(p, "__dynamic_array_append", args);
}
break;