Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: src/IceTypes.cpp

Issue 618313003: Subzero: Move to C++11 static_assert(). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceIntrinsics.cpp ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTypes.cpp
diff --git a/src/IceTypes.cpp b/src/IceTypes.cpp
index 29ff4de0799375d870be2385b40c53862dd641cd..845cae5f7b8d77ef20f51c86055dd212e848513e 100644
--- a/src/IceTypes.cpp
+++ b/src/IceTypes.cpp
@@ -41,12 +41,16 @@ void __attribute__((unused)) xIceTypeMacroIntegrityCheck() {
};
// Assert that tags in ICETYPE_TABLE are also in ICETYPE_PROPS_TABLE.
#define X(tag, size, align, elts, elty, str) \
- STATIC_ASSERT((unsigned)_table_tag_##tag == (unsigned)_props_table_tag_##tag);
+ static_assert( \
+ (unsigned)_table_tag_##tag == (unsigned)_props_table_tag_##tag, \
+ "Inconsistency between ICETYPE_PROPS_TABLE and ICETYPE_TABLE");
ICETYPE_TABLE;
#undef X
// Assert that tags in ICETYPE_PROPS_TABLE is in ICETYPE_TABLE.
#define X(tag, IsVec, IsInt, IsFloat, IsIntArith, IsLoadStore, CompareResult) \
- STATIC_ASSERT((unsigned)_table_tag_##tag == (unsigned)_props_table_tag_##tag);
+ static_assert( \
+ (unsigned)_table_tag_##tag == (unsigned)_props_table_tag_##tag, \
+ "Inconsistency between ICETYPE_PROPS_TABLE and ICETYPE_TABLE");
ICETYPE_PROPS_TABLE
#undef X
@@ -69,7 +73,8 @@ void __attribute__((unused)) xIceTypeMacroIntegrityCheck() {
};
// Verify that the number of vector elements is consistent with IsVec.
#define X(tag, IsVec, IsInt, IsFloat, IsIntArith, IsLoadStore, CompareResult) \
- STATIC_ASSERT((_table_elts_##tag > 1) == _props_table_IsVec_##tag);
+ static_assert((_table_elts_##tag > 1) == _props_table_IsVec_##tag, \
+ "Inconsistent vector specification in ICETYPE_PROPS_TABLE");
ICETYPE_PROPS_TABLE;
#undef X
}
« src/IceIntrinsics.cpp ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698