aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-26 09:31:10 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-26 09:31:10 +0100
commita6d5ec2de85ae446a1b69f6bff16010900db55fe (patch)
tree2f1c31f0bded27c075a319de764a0b4b9c46442d /src
parent0ae86dbe879ed58a4ca2220abf69b82f715eec35 (diff)
Early short circuit `lb_construct_const_union`
Diffstat (limited to 'src')
-rw-r--r--src/llvm_backend_const.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index aa5696ba3..efd97121a 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -676,6 +676,9 @@ gb_internal LLVMValueRef lb_construct_const_union(lbModule *m, LLVMValueRef vari
}
return LLVMConstNamedStruct(llvm_type, values, i);
+ } else if (true) {
+ // TODO(bill): ignore this for the time being
+ return nullptr;
}
LLVMTypeRef block_type = LLVMStructGetTypeAtIndex(llvm_type, 0);
@@ -701,10 +704,6 @@ gb_internal LLVMValueRef lb_construct_const_union(lbModule *m, LLVMValueRef vari
} else if (lb_sizeof(llvm_variant_type) == 0) {
block_value = LLVMConstNull(block_type);
} else if (block_type != llvm_variant_type) {
- if (true) {
- // TODO(bill): ignore this for the time being
- return nullptr;
- }
LLVMTypeKind block_kind = LLVMGetTypeKind(block_type);
LLVMTypeKind variant_kind = LLVMGetTypeKind(llvm_variant_type);