diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-11-04 20:56:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-04 20:56:49 +0000 |
| commit | 12d8572d439d40d030b12e8fc98210ed255405d7 (patch) | |
| tree | bdcdac4db3ca857ed5515492c348617ff4d3d536 /src/llvm_backend_utility.cpp | |
| parent | f70454c237a74b8ead76bf1cd6d3fb94e30d2e8a (diff) | |
| parent | 3ef063632498a59bd6df3de5d34e92bf6b6102d8 (diff) | |
Merge pull request #5886 from laytan/32bit-typeid-fixes
fixes for 32bit with regards to typeid
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index c7b4170e9..33ad2ee8d 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -1005,6 +1005,7 @@ gb_internal i32 lb_convert_struct_index(lbModule *m, Type *t, i32 index) { switch (index) { case 0: return 0; // data case 1: return 2; // id + default: GB_PANIC("index > 1"); } } else if (build_context.ptr_size != build_context.int_size) { switch (t->kind) { @@ -1203,6 +1204,7 @@ gb_internal lbValue lb_emit_struct_ep(lbProcedure *p, lbValue s, i32 index) { switch (index) { case 0: result_type = t_rawptr; break; case 1: result_type = t_typeid; break; + default: GB_PANIC("index > 1"); } } else if (is_type_dynamic_array(t)) { switch (index) { |