Some more indirect tests
All checks were successful
All checks were successful
This commit is contained in:
parent
4a93d5d3d4
commit
1bf6198030
@ -2036,6 +2036,11 @@ value_is_constant = fn (value: &Value) u1
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
|
.aggregate_initialization =>
|
||||||
|
{
|
||||||
|
assert(value.type != zero);
|
||||||
|
return value.content.aggregate_initialization.is_constant;
|
||||||
|
},
|
||||||
else =>
|
else =>
|
||||||
{
|
{
|
||||||
#trap();
|
#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
|
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);
|
assert(right.llvm == zero);
|
||||||
|
|
||||||
>pointer_type = left_type;
|
>pointer_type = left_type;
|
||||||
@ -11180,7 +11202,8 @@ emit_assignment = fn (module: &Module, left_llvm: &LLVMValue, left_type: &Type,
|
|||||||
},
|
},
|
||||||
else =>
|
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
|
else
|
||||||
{
|
{
|
||||||
#trap();
|
emit_block(module, return_block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -12959,6 +12982,8 @@ names: [_][]u8 =
|
|||||||
"if_no_else",
|
"if_no_else",
|
||||||
"if_no_else_void",
|
"if_no_else_void",
|
||||||
"indirect",
|
"indirect",
|
||||||
|
"indirect_struct",
|
||||||
|
"indirect_varargs",
|
||||||
];
|
];
|
||||||
|
|
||||||
[export] main = fn [cc(c)] (argument_count: u32, argv: &&u8, envp: &&u8) s32
|
[export] main = fn [cc(c)] (argument_count: u32, argv: &&u8, envp: &&u8) s32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user