Merge pull request #4655 from tgsm/gcc-version

Remove GCC version checks
This commit is contained in:
Weiyi Wang 2019-02-22 16:21:21 -05:00 committed by GitHub
commit 8f2bd97277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 25 deletions

View file

@ -17,21 +17,12 @@ class Process;
namespace Service::LDR {
// GCC versions < 5.0 do not implement std::is_trivially_copyable.
// Excluding MSVC because it has weird behaviour for std::is_trivially_copyable.
#if (__GNUC__ >= 5) || defined(__clang__)
#define ASSERT_CRO_STRUCT(name, size) \
static_assert(std::is_standard_layout<name>::value, \
"CRO structure " #name " doesn't use standard layout"); \
static_assert(std::is_trivially_copyable<name>::value, \
"CRO structure " #name " isn't trivially copyable"); \
static_assert(sizeof(name) == (size), "Unexpected struct size for CRO structure " #name)
#else
#define ASSERT_CRO_STRUCT(name, size) \
static_assert(std::is_standard_layout<name>::value, \
"CRO structure " #name " doesn't use standard layout"); \
static_assert(sizeof(name) == (size), "Unexpected struct size for CRO structure " #name)
#endif
static constexpr u32 CRO_HEADER_SIZE = 0x138;
static constexpr u32 CRO_HASH_SIZE = 0x80;