summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.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/mir/from_hir.cpp
parentaf7089cec53828533462af5349e861f7d524d22e (diff)
downloadmrust-3f047e495793a1eed8244b96bc0dddff275cd19c.tar.gz
All - i128/u182 support, typecheck and parse fixes
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 6eb91386..6abf3508 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -983,6 +983,7 @@ namespace {
case ::HIR::CoreType::U16:
case ::HIR::CoreType::U32:
case ::HIR::CoreType::U64:
+ case ::HIR::CoreType::U128:
case ::HIR::CoreType::Usize:
BUG(node.span(), "`-` operator on unsigned integer - " << ty_val);
break;
@@ -1611,6 +1612,7 @@ namespace {
case ::HIR::CoreType::U16:
case ::HIR::CoreType::U32:
case ::HIR::CoreType::U64:
+ case ::HIR::CoreType::U128:
case ::HIR::CoreType::Usize:
m_builder.set_result(node.span(), ::MIR::RValue( ::MIR::Constant(e.m_value) ));
break;
@@ -1618,6 +1620,7 @@ namespace {
case ::HIR::CoreType::I16:
case ::HIR::CoreType::I32:
case ::HIR::CoreType::I64:
+ case ::HIR::CoreType::I128:
case ::HIR::CoreType::Isize:
m_builder.set_result(node.span(), ::MIR::RValue( ::MIR::Constant( static_cast<int64_t>(e.m_value) ) ));
break;