aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-02-03 15:07:44 +0000
committergingerBill <bill@gingerbill.org>2023-02-03 15:07:44 +0000
commitde0a3e0ab986f6ea9c73315a8405103a4e147bb8 (patch)
tree888bd539c7954c4972b3ff25c803d98765ef5b03 /src/llvm_backend.cpp
parentd26110da7f0757dc4d6cc4e2da6bb3d95d97e96b (diff)
Minor change to `byval` for readonly parameters
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index b22d7c9a2..34c1ec9b4 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -495,11 +495,11 @@ gb_internal lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
lb_add_proc_attribute_at_index(p, 1+0, "nonnull");
lb_add_proc_attribute_at_index(p, 1+0, "noalias");
- // lb_add_proc_attribute_at_index(p, 1+0, "readonly");
+ lb_add_proc_attribute_at_index(p, 1+0, "readonly");
lb_add_proc_attribute_at_index(p, 1+2, "nonnull");
lb_add_proc_attribute_at_index(p, 1+2, "noalias");
- // lb_add_proc_attribute_at_index(p, 1+2, "readonly");
+ lb_add_proc_attribute_at_index(p, 1+2, "readonly");
lbBlock *loop_block = lb_create_block(p, "loop");
lbBlock *hash_block = lb_create_block(p, "hash");
@@ -599,6 +599,8 @@ gb_internal lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
LLVMBuildRet(p->builder, res.value);
}
+ gb_printf_err("%s\n", LLVMPrintValueToString(p->value));
+
return {p->value, p->type};
}