diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2011-04-04 14:42:22 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2011-04-04 14:42:22 +0000 |
commit | db37e4072361bc44f2c0661cb1add90e74012b13 (patch) | |
tree | 651937403ee1b4a35779c96a2b4bc6664119d462 /utils/TableGen/X86DisassemblerTables.cpp | |
parent | 528a510ba1eed791b6dcf270b080175b8a3f0d20 (diff) | |
download | external_llvm-db37e4072361bc44f2c0661cb1add90e74012b13.zip external_llvm-db37e4072361bc44f2c0661cb1add90e74012b13.tar.gz external_llvm-db37e4072361bc44f2c0661cb1add90e74012b13.tar.bz2 |
Change loops to derive the number of tables automatically
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/X86DisassemblerTables.cpp')
-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 081b577..66f1fab 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]; } |