diff options
| author | gingerBill <bill@gingerbill.org> | 2023-06-06 23:11:42 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-06-06 23:11:42 +0100 |
| commit | ca6cef9a7ddb1e3714cc9f5a43053bc7a240b115 (patch) | |
| tree | bf2720a1535cd48cf919d6e33e0ed9f40de7c0ac /src/llvm_backend_utility.cpp | |
| parent | 1c2a30d7e9a0f2ce29d2e8c2f06adf83d16779ac (diff) | |
Fix wasm intrinsics; fix `len` for strings and slices
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index 4499803e5..0c26382ed 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -932,6 +932,11 @@ gb_internal i32 lb_convert_struct_index(lbModule *m, Type *t, i32 index) { return field_remapping[index]; } else if (build_context.ptr_size != build_context.int_size) { switch (t->kind) { + case Type_Basic: + if (t->Basic.kind != Basic_string) { + break; + } + /*fallthrough*/ case Type_Slice: GB_ASSERT(build_context.ptr_size*2 == build_context.int_size); switch (index) { |