summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hir_typeck/static.cpp4
-rw-r--r--src/trans/codegen_c.cpp2
-rw-r--r--vsproject/mrustc.vcxproj1
-rw-r--r--vsproject/mrustc.vcxproj.filters3
4 files changed, 7 insertions, 3 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp
index 0067eb7f..1d613d96 100644
--- a/src/hir_typeck/static.cpp
+++ b/src/hir_typeck/static.cpp
@@ -1574,7 +1574,7 @@ bool StaticTraitResolve::can_unsize(const Span& sp, const ::HIR::TypeRef& dst_ty
// 1. Data trait must be the same
if( de->m_trait != se->m_trait )
{
- return ::HIR::Compare::Unequal;
+ return false;
}
// 2. Destination markers must be a strict subset
@@ -1658,7 +1658,7 @@ bool StaticTraitResolve::can_unsize(const Span& sp, const ::HIR::TypeRef& dst_ty
}
DEBUG("Can't unsize, no rules matched");
- return ::HIR::Compare::Unequal;
+ return false;
}
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp
index f5c1a61d..9ef60523 100644
--- a/src/trans/codegen_c.cpp
+++ b/src/trans/codegen_c.cpp
@@ -113,7 +113,7 @@ namespace {
;
// u128/i128 ops
m_of
- << "static inline unsigned __int128 __builtin_bswap128(unsigned __int128 v) {\n"
+ << "static inline unsigned __int128 __builtin_bswap128(uint128_t v) {\n"
<< "\tuint64_t lo = __builtin_bswap64((uint64_t)v);\n"
<< "\tuint64_t hi = __builtin_bswap64((uint64_t)(v>>64));\n"
<< "\treturn ((uint128_t)lo << 64) | (uint128_t)hi;\n"
diff --git a/vsproject/mrustc.vcxproj b/vsproject/mrustc.vcxproj
index ba913910..02cacc30 100644
--- a/vsproject/mrustc.vcxproj
+++ b/vsproject/mrustc.vcxproj
@@ -231,6 +231,7 @@
<ClCompile Include="..\src\span.cpp" />
<ClCompile Include="..\src\trans\codegen.cpp" />
<ClCompile Include="..\src\trans\codegen_c.cpp" />
+ <ClCompile Include="..\src\trans\codegen_c_structured.cpp" />
<ClCompile Include="..\src\trans\enumerate.cpp" />
<ClCompile Include="..\src\trans\mangling.cpp" />
<ClCompile Include="..\src\trans\monomorphise.cpp" />
diff --git a/vsproject/mrustc.vcxproj.filters b/vsproject/mrustc.vcxproj.filters
index 8ec87927..35c2f39d 100644
--- a/vsproject/mrustc.vcxproj.filters
+++ b/vsproject/mrustc.vcxproj.filters
@@ -368,6 +368,9 @@
<ClCompile Include="..\src\mir\check_full.cpp">
<Filter>Source Files\mir</Filter>
</ClCompile>
+ <ClCompile Include="..\src\trans\codegen_c_structured.cpp">
+ <Filter>Source Files\trans</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\common.hpp">