mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Allow uintptr <-> [^]T
This commit is contained in:
@@ -1272,6 +1272,18 @@ lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
|||||||
res.value = LLVMBuildIntToPtr(p->builder, value.value, lb_type(m, t), "");
|
res.value = LLVMBuildIntToPtr(p->builder, value.value, lb_type(m, t), "");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (is_type_multi_pointer(src) && is_type_uintptr(dst)) {
|
||||||
|
lbValue res = {};
|
||||||
|
res.type = t;
|
||||||
|
res.value = LLVMBuildPtrToInt(p->builder, value.value, lb_type(m, t), "");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
if (is_type_uintptr(src) && is_type_multi_pointer(dst)) {
|
||||||
|
lbValue res = {};
|
||||||
|
res.type = t;
|
||||||
|
res.value = LLVMBuildIntToPtr(p->builder, value.value, lb_type(m, t), "");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if (is_type_union(dst)) {
|
if (is_type_union(dst)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user