mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix #2282 caused by a typo
This commit is contained in:
@@ -1558,13 +1558,13 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
|||||||
if (is_type_boolean(src) && dst == t_llvm_bool) {
|
if (is_type_boolean(src) && dst == t_llvm_bool) {
|
||||||
lbValue res = {};
|
lbValue res = {};
|
||||||
res.value = LLVMBuildTrunc(p->builder, value.value, lb_type(m, dst), "");
|
res.value = LLVMBuildTrunc(p->builder, value.value, lb_type(m, dst), "");
|
||||||
res.type = dst;
|
res.type = t;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (src == t_llvm_bool && is_type_boolean(dst)) {
|
if (src == t_llvm_bool && is_type_boolean(dst)) {
|
||||||
lbValue res = {};
|
lbValue res = {};
|
||||||
res.value = LLVMBuildZExt(p->builder, value.value, lb_type(m, dst), "");
|
res.value = LLVMBuildZExt(p->builder, value.value, lb_type(m, dst), "");
|
||||||
res.type = dst;
|
res.type = t;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2162,7 +2162,7 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
|||||||
// bit_set <-> integer
|
// bit_set <-> integer
|
||||||
if (is_type_integer(src) && is_type_bit_set(dst)) {
|
if (is_type_integer(src) && is_type_bit_set(dst)) {
|
||||||
lbValue res = lb_emit_conv(p, value, bit_set_to_int(dst));
|
lbValue res = lb_emit_conv(p, value, bit_set_to_int(dst));
|
||||||
res.type = dst;
|
res.type = t;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (is_type_bit_set(src) && is_type_integer(dst)) {
|
if (is_type_bit_set(src) && is_type_integer(dst)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user