Do once flag never set to true.
authorJim Laskey <jlaskey@mac.com>
Wed, 19 Jul 2006 19:33:08 +0000 (19:33 +0000)
committerJim Laskey <jlaskey@mac.com>
Wed, 19 Jul 2006 19:33:08 +0000 (19:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29214 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FloatingPoint.cpp

index 01b1916a898e8c6351de7896cb0cd9456270bdb2..8bd0276aa4772f3cce8dbd9dc600337ceaf3afc7 100644 (file)
@@ -312,9 +312,11 @@ static int Lookup(const TableEntry *Table, unsigned N, unsigned Opcode) {
 #else
 #define ASSERT_SORTED(TABLE)                                              \
   { static bool TABLE##Checked = false;                                   \
-    if (!TABLE##Checked)                                                  \
+    if (!TABLE##Checked) {                                                \
        assert(TableIsSorted(TABLE, ARRAY_SIZE(TABLE)) &&                  \
               "All lookup tables must be sorted for efficient access!");  \
+       TABLE##Checked = true;                                             \
+    }                                                                     \
   }
 #endif