Skip to content

Commit 5e2de79

Browse files
committed
rustc: load bools as unsigned numbers.
Apparently loading them signed will break if/when they become i1.
1 parent 285c25f commit 5e2de79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/trans/datum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ fn load<'a>(bcx: &'a Block<'a>, llptr: ValueRef, ty: ty::t) -> ValueRef {
545545
if type_is_zero_size(bcx.ccx(), ty) {
546546
C_undef(type_of::type_of(bcx.ccx(), ty))
547547
} else if ty::type_is_bool(ty) {
548-
LoadRangeAssert(bcx, llptr, 0, 2, lib::llvm::True)
548+
LoadRangeAssert(bcx, llptr, 0, 2, lib::llvm::False)
549549
} else if ty::type_is_char(ty) {
550550
// a char is a unicode codepoint, and so takes values from 0
551551
// to 0x10FFFF inclusive only.

0 commit comments

Comments
 (0)