[llvm] Replacing asserts with static_asserts where appropriate
[oota-llvm.git] / lib / Target / X86 / X86FloatingPoint.cpp
index 456f4e633f2a7044ddfe658a35a844f034477609..9ddbfd5384fc6adfc01394da6cb9259777c6cbb7 100644 (file)
@@ -300,7 +300,7 @@ bool FPS::runOnMachineFunction(MachineFunction &MF) {
   // function.  If it is all integer, there is nothing for us to do!
   bool FPIsUsed = false;
 
-  assert(X86::FP6 == X86::FP0+6 && "Register enums aren't sorted right!");
+  static_assert(X86::FP6 == X86::FP0+6, "Register enums aren't sorted right!");
   for (unsigned i = 0; i <= 6; ++i)
     if (MF.getRegInfo().isPhysRegUsed(X86::FP0+i)) {
       FPIsUsed = true;