diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-04-04 00:52:49 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-04-04 01:45:11 +0200 |
commit | 87b3f382f7b9c8d5e788a7e3b45b58706183a614 (patch) | |
tree | 3275e040b272481940a7fec672176f1c93787d50 /src/codegen/mod.rs | |
parent | 5e85271697255498603e852eaa0723da5f41f1bf (diff) |
ir: Handle char in a more cross-platform way when possible.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 5586c146..ee4a9d4e 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2471,7 +2471,8 @@ impl TryToRustTy for Type { TypeKind::Int(ik) => { match ik { IntKind::Bool => Ok(aster::ty::TyBuilder::new().bool()), - IntKind::Char => Ok(raw_type(ctx, "c_schar")), + IntKind::Char { .. } => Ok(raw_type(ctx, "c_char")), + IntKind::SChar => Ok(raw_type(ctx, "c_schar")), IntKind::UChar => Ok(raw_type(ctx, "c_uchar")), IntKind::Short => Ok(raw_type(ctx, "c_short")), IntKind::UShort => Ok(raw_type(ctx, "c_ushort")), |