Some more indirect tests
All checks were successful
CI / ci (Release, ubuntu-latest) (push) Successful in 1m47s
CI / ci (RelWithDebInfo, ubuntu-latest) (push) Successful in 1m50s
CI / ci (MinSizeRel, ubuntu-latest) (push) Successful in 1m52s
CI / ci (Debug, ubuntu-latest) (push) Successful in 8m32s

This commit is contained in:
David Gonzalez Martin 2025-06-13 10:37:45 -06:00
parent 4a93d5d3d4
commit 1bf6198030

View File

@ -2036,6 +2036,11 @@ value_is_constant = fn (value: &Value) u1
{
return 0;
},
.aggregate_initialization =>
{
assert(value.type != zero);
return value.content.aggregate_initialization.is_constant;
},
else =>
{
#trap();
@ -11053,6 +11058,23 @@ emit_string_literal = fn (module: &Module, value: &Value) [2]&LLVMValue
emit_assignment = fn (module: &Module, left_llvm: &LLVMValue, left_type: &Type, right: &Value) void
{
>parent_function_global: &Global = undefined;
if (module.current_function)
{
parent_function_global = module.current_function;
}
else if (module.current_macro_instantiation)
{
#trap();
}
else
{
report_error();
}
>llvm_function = parent_function_global.variable.storage.llvm;
assert(llvm_function != zero);
assert(right.llvm == zero);
>pointer_type = left_type;
@ -11180,7 +11202,8 @@ emit_assignment = fn (module: &Module, left_llvm: &LLVMValue, left_type: &Type,
},
else =>
{
#trap();
>result = emit_va_arg(module, right, left_llvm, left_type, llvm_function);
assert(result == left_llvm);
},
}
},
@ -12510,7 +12533,7 @@ emit = fn (module: &Module) void
}
else
{
#trap();
emit_block(module, return_block);
}
}
else
@ -12959,6 +12982,8 @@ names: [_][]u8 =
"if_no_else",
"if_no_else_void",
"indirect",
"indirect_struct",
"indirect_varargs",
];
[export] main = fn [cc(c)] (argument_count: u32, argv: &&u8, envp: &&u8) s32