diff options
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/X86DisassemblerTables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp index 081b5771cd..66f1fab054 100644 --- a/utils/TableGen/X86DisassemblerTables.cpp +++ b/utils/TableGen/X86DisassemblerTables.cpp @@ -267,7 +267,7 @@ static const char* stringForModifierType(ModifierType mt) DisassemblerTables::DisassemblerTables() { unsigned i; - for (i = 0; i < 4; i++) { + for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) { Tables[i] = new ContextDecision; memset(Tables[i], 0, sizeof(ContextDecision)); } @@ -278,7 +278,7 @@ DisassemblerTables::DisassemblerTables() { DisassemblerTables::~DisassemblerTables() { unsigned i; - for (i = 0; i < 4; i++) + for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) delete Tables[i]; } |