Skip to content

Commit 6c9a4ba

Browse files
committed
rustc: Add Type::c_int()
Add c_int for use in the compiler, assuming i32 for all targets as in libc.
1 parent d887369 commit 6c9a4ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc_trans/type_.rs

+4
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ impl Type {
140140
}
141141
}
142142

143+
pub fn c_int(ccx: &CrateContext) -> Type {
144+
Type::i32(ccx)
145+
}
146+
143147
pub fn int_from_ty(ccx: &CrateContext, t: ast::IntTy) -> Type {
144148
match t {
145149
ast::IntTy::Is => ccx.isize_ty(),

0 commit comments

Comments
 (0)