aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_general.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-02 13:11:34 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-02 13:11:34 +0100
commitdca9bf0b0c8a3ad2ac6854c901d99868d3a296d5 (patch)
tree20a17e438b0409e45e293264ea7f76fafdd6e13e /src/llvm_backend_general.cpp
parente049dde582ac6525b9ce470a4af89075408c8de9 (diff)
Fix string16 literal length set in LLVM
Diffstat (limited to 'src/llvm_backend_general.cpp')
-rw-r--r--src/llvm_backend_general.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 064d0ef39..d84b8302b 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -2758,7 +2758,7 @@ gb_internal LLVMValueRef lb_find_or_add_entity_string16_ptr(lbModule *m, String1
LLVMValueRef global_data = LLVMAddGlobal(m->mod, type, name);
LLVMSetInitializer(global_data, data);
lb_make_global_private_const(global_data);
- LLVMSetAlignment(global_data, 1);
+ LLVMSetAlignment(global_data, 2);
LLVMValueRef ptr = LLVMConstInBoundsGEP2(type, global_data, indices, 2);
if (!custom_link_section) {
@@ -2855,7 +2855,7 @@ gb_internal lbValue lb_find_or_add_entity_string16_slice_with_type(lbModule *m,
LLVMValueRef global_data = LLVMAddGlobal(m->mod, type, name);
LLVMSetInitializer(global_data, data);
lb_make_global_private_const(global_data);
- LLVMSetAlignment(global_data, 1);
+ LLVMSetAlignment(global_data, 2);
i64 data_len = str.len;
LLVMValueRef ptr = nullptr;