Replace some run-time assertions with compile-time ones in ART.
Change-Id: I16c3fad45c4b98b94b7c83d071374096e81d407a
diff --git a/runtime/arch/x86/thread_x86.cc b/runtime/arch/x86/thread_x86.cc
index b97c143..3d19f06 100644
--- a/runtime/arch/x86/thread_x86.cc
+++ b/runtime/arch/x86/thread_x86.cc
@@ -79,7 +79,8 @@
}
#else
// Read current LDT entries.
- CHECK_EQ((size_t)LDT_ENTRY_SIZE, sizeof(uint64_t));
+ static_assert(static_cast<size_t>(LDT_ENTRY_SIZE) == sizeof(uint64_t),
+ "LDT_ENTRY_SIZE is different from sizeof(uint64_t).");
std::vector<uint64_t> ldt(LDT_ENTRIES);
size_t ldt_size(sizeof(uint64_t) * ldt.size());
memset(&ldt[0], 0, ldt_size);