Skip to content
Permalink
Browse files
Merge pull request #10027 from shuffle2/remove-wa
revert workaround for msvc arm64 ICE in WIABlob
  • Loading branch information
lioncash committed Aug 14, 2021
2 parents 891726e + 4ef8719 commit fd8a818
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
@@ -240,27 +240,26 @@ class WIARVZFileReader : public BlobReader

struct ReuseID
{
// This code is a workaround for an ICE in Visual Studio 16.10.0 when making an ARM64 Release
// build. Once a fixed version of Visual Studio is released, we can use std::tie instead.
#define COMPARE_REUSE_ID_INNER(op, f, next) ((f != other.f) ? (f op other.f) : (next))
#define COMPARE_REUSE_ID(op, equal_result) \
COMPARE_REUSE_ID_INNER( \
op, partition_key, \
COMPARE_REUSE_ID_INNER( \
op, data_size, \
COMPARE_REUSE_ID_INNER(op, encrypted, COMPARE_REUSE_ID_INNER(op, value, equal_result))))

bool operator==(const ReuseID& other) const { return COMPARE_REUSE_ID(==, true); }
bool operator<(const ReuseID& other) const { return COMPARE_REUSE_ID(<, false); }
bool operator>(const ReuseID& other) const { return COMPARE_REUSE_ID(>, false); }
bool operator==(const ReuseID& other) const
{
return std::tie(partition_key, data_size, encrypted, value) ==
std::tie(other.partition_key, other.data_size, other.encrypted, other.value);
}
bool operator<(const ReuseID& other) const
{
return std::tie(partition_key, data_size, encrypted, value) <
std::tie(other.partition_key, other.data_size, other.encrypted, other.value);
}
bool operator>(const ReuseID& other) const
{
return std::tie(partition_key, data_size, encrypted, value) >
std::tie(other.partition_key, other.data_size, other.encrypted, other.value);
}

bool operator!=(const ReuseID& other) const { return !operator==(other); }
bool operator>=(const ReuseID& other) const { return !operator<(other); }
bool operator<=(const ReuseID& other) const { return !operator>(other); }

#undef COMPARE_REUSE_ID_INNER
#undef COMPARE_REUSE_ID

WiiKey partition_key;
u64 data_size;
bool encrypted;
@@ -6,7 +6,7 @@
#define STRINGIFY_HELPER(x) #x
#define STRINGIFY(x) STRINGIFY_HELPER(x)

#if defined _MSC_FULL_VER && _MSC_FULL_VER < 192930037
#if defined _MSC_FULL_VER && _MSC_FULL_VER < 192930133
#pragma message("Current _MSC_FULL_VER: " STRINGIFY(_MSC_FULL_VER))
#error Please update your build environment to the latest Visual Studio 2019!
#endif

0 comments on commit fd8a818

Please sign in to comment.