summaryrefslogtreecommitdiff
path: root/src/trans/codegen_c.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-01-08 09:48:19 +0800
committerJohn Hodge <tpg@mutabah.net>2017-01-08 09:48:19 +0800
commit3f047e495793a1eed8244b96bc0dddff275cd19c (patch)
treea53112cc7ecfd414b1832a8a1a28c4643c100b46 /src/trans/codegen_c.cpp
parentaf7089cec53828533462af5349e861f7d524d22e (diff)
downloadmrust-3f047e495793a1eed8244b96bc0dddff275cd19c.tar.gz
All - i128/u182 support, typecheck and parse fixes
Diffstat (limited to 'src/trans/codegen_c.cpp')
-rw-r--r--src/trans/codegen_c.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp
index 1f54c006..82196d75 100644
--- a/src/trans/codegen_c.cpp
+++ b/src/trans/codegen_c.cpp
@@ -709,6 +709,7 @@ namespace {
m_of << ::std::hex << "0x" << (e & 0xFFFFFFFF) << ::std::dec;
break;
case ::HIR::CoreType::U64:
+ case ::HIR::CoreType::U128:
case ::HIR::CoreType::Usize:
m_of << ::std::hex << "0x" << e << ::std::dec;
break;
@@ -722,6 +723,7 @@ namespace {
m_of << static_cast<int32_t>(e);
break;
case ::HIR::CoreType::I64:
+ case ::HIR::CoreType::I128:
case ::HIR::CoreType::Isize:
m_of << static_cast<int64_t>(e);
break;
@@ -1106,6 +1108,7 @@ namespace {
m_of << ::std::hex << "0x" << (c & 0xFFFFFFFF) << ::std::dec;
break;
case ::HIR::CoreType::U64:
+ case ::HIR::CoreType::U128:
case ::HIR::CoreType::Usize:
m_of << ::std::hex << "0x" << c << ::std::dec;
break;
@@ -2448,6 +2451,8 @@ namespace {
case ::HIR::CoreType::I32: m_of << "int32_t"; break;
case ::HIR::CoreType::U64: m_of << "uint64_t"; break;
case ::HIR::CoreType::I64: m_of << "int64_t"; break;
+ case ::HIR::CoreType::U128: m_of << "uint128_t"; break;
+ case ::HIR::CoreType::I128: m_of << "int128_t"; break;
case ::HIR::CoreType::F32: m_of << "float"; break;
case ::HIR::CoreType::F64: m_of << "double"; break;