diff options
author | John Hodge (bugs) <tpg@mutabah.net> | 2017-07-06 20:05:02 +0800 |
---|---|---|
committer | John Hodge (bugs) <tpg@mutabah.net> | 2017-07-06 20:05:02 +0800 |
commit | bded1205ddf56332f5864f4a93d69b74a41fb38f (patch) | |
tree | fe35b09d89607721770a52ffc86543deb56ef1f1 | |
parent | 48e2c4973d5401c9f7d0ee2bac22ac6015744961 (diff) | |
download | mrust-bded1205ddf56332f5864f4a93d69b74a41fb38f.tar.gz |
Misc - Minor MSVC fixes
-rw-r--r-- | src/hir_typeck/static.cpp | 4 | ||||
-rw-r--r-- | src/trans/codegen_c.cpp | 2 | ||||
-rw-r--r-- | vsproject/mrustc.vcxproj | 1 | ||||
-rw-r--r-- | vsproject/mrustc.vcxproj.filters | 3 |
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"> |