mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Fix #674
This commit is contained in:
+7
-4
@@ -3333,6 +3333,13 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar
|
|||||||
irValue *xx = ir_emit_struct_ev(p, x, cast(i32)j);
|
irValue *xx = ir_emit_struct_ev(p, x, cast(i32)j);
|
||||||
array_add(&processed_args, xx);
|
array_add(&processed_args, xx);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (type_size_of(new_type) == type_size_of(original_type)) {
|
||||||
|
irValue *x = ir_emit_transmute(p, args[i], new_type);
|
||||||
|
array_add(&processed_args, x);
|
||||||
|
} else {
|
||||||
|
GB_PANIC("ABI ERROR: %s %s %s\n", type_to_string(original_type), type_to_string(new_type), type_to_string(arg_type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
irValue *x = ir_emit_conv(p, args[i], new_type);
|
irValue *x = ir_emit_conv(p, args[i], new_type);
|
||||||
@@ -6855,10 +6862,6 @@ u64 ir_generate_source_code_location_hash(TokenPos pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
irValue *ir_emit_source_code_location(irProcedure *proc, String procedure, TokenPos pos) {
|
irValue *ir_emit_source_code_location(irProcedure *proc, String procedure, TokenPos pos) {
|
||||||
if (pos.file == "") {
|
|
||||||
gb_printf_err("here\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
gbAllocator a = ir_allocator();
|
gbAllocator a = ir_allocator();
|
||||||
irValue *v = ir_alloc_value(irValue_SourceCodeLocation);
|
irValue *v = ir_alloc_value(irValue_SourceCodeLocation);
|
||||||
v->SourceCodeLocation.file = ir_find_or_add_entity_string(proc->module, pos.file);
|
v->SourceCodeLocation.file = ir_find_or_add_entity_string(proc->module, pos.file);
|
||||||
|
|||||||
Reference in New Issue
Block a user