comptime expandable match statements

This commit is contained in:
2026-07-17 14:29:50 +02:00
parent 1f25e6cd1d
commit 97f1c06057
22 changed files with 120821 additions and 119318 deletions
+3 -1
View File
@@ -1103,7 +1103,9 @@ emit_instruction_stream :: proc(
fmt.sbprintf(
&emitter.builder,
" %%v%d = getelementptr %s, ptr %%v%d, i64 0\n",
instruction_index, llvm_type(child, &emitter.module.types), instruction.a,
instruction_index,
"i8" if types.is_void(child) else llvm_type(child, &emitter.module.types),
instruction.a,
)
case .Alloca:
if !types.is_runtime_value(instruction.type, &emitter.module.types) {