diff options
| author | Daniel Klauer <daniel.c.klauer@web.de> | 2017-09-21 23:43:05 +0200 |
|---|---|---|
| committer | Daniel Klauer <daniel.c.klauer@web.de> | 2017-09-28 22:06:54 +0200 |
| commit | 6c9a4ba8eb2badef6f1ff040e61e4fe494585d79 (patch) | |
| tree | 360c876ba92c96e685ad851c27ec57bbf451803b | |
| parent | d88736905e403ce3d0a68648fe1cd77dffad3641 (diff) | |
| download | rust-6c9a4ba8eb2badef6f1ff040e61e4fe494585d79.tar.gz rust-6c9a4ba8eb2badef6f1ff040e61e4fe494585d79.zip | |
rustc: Add Type::c_int()
Add c_int for use in the compiler, assuming i32 for all targets as in libc.
| -rw-r--r-- | src/librustc_trans/type_.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_trans/type_.rs b/src/librustc_trans/type_.rs index e5e532703d7..65fdd72bd29 100644 --- a/src/librustc_trans/type_.rs +++ b/src/librustc_trans/type_.rs @@ -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(), |
