rustc: Add Type::c_int()
Add c_int for use in the compiler, assuming i32 for all targets as in libc.
This commit is contained in:
parent
d88736905e
commit
6c9a4ba8eb
@ -140,6 +140,10 @@ impl Type {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn c_int(ccx: &CrateContext) -> Type {
|
||||
Type::i32(ccx)
|
||||
}
|
||||
|
||||
pub fn int_from_ty(ccx: &CrateContext, t: ast::IntTy) -> Type {
|
||||
match t {
|
||||
ast::IntTy::Is => ccx.isize_ty(),
|
||||
|
Loading…
Reference in New Issue
Block a user