Skip to content

Commit 88c058b

Browse files
committed
make memcmp return a value of c_int_width instead of i32
1 parent 81083b9 commit 88c058b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
9191
self.const_uint(self.type_i1(), val as u64)
9292
}
9393

94+
fn const_i16(&self, i: i16) -> RValue<'gcc> {
95+
self.const_int(self.type_i16(), i as i64)
96+
}
97+
9498
fn const_i32(&self, i: i32) -> RValue<'gcc> {
9599
self.const_int(self.type_i32(), i as i64)
96100
}

0 commit comments

Comments
 (0)