diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2011-04-04 16:25:38 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2011-04-04 16:25:38 +0000 |
commit | 39d7caea6938536e5528a76b28461000765a7556 (patch) | |
tree | 4874d1806cff2689ba0a1feda172096d7b79dfcd /utils/TableGen/X86DisassemblerTables.cpp | |
parent | 229e4523f2f12929defa09ac4ef9f3652f21f1ec (diff) | |
download | external_llvm-39d7caea6938536e5528a76b28461000765a7556.zip external_llvm-39d7caea6938536e5528a76b28461000765a7556.tar.gz external_llvm-39d7caea6938536e5528a76b28461000765a7556.tar.bz2 |
Use array_lengthof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/X86DisassemblerTables.cpp')
-rw-r--r-- | utils/TableGen/X86DisassemblerTables.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/X86DisassemblerTables.cpp b/utils/TableGen/X86DisassemblerTables.cpp index 66f1fab..cbd0233 100644 --- a/utils/TableGen/X86DisassemblerTables.cpp +++ b/utils/TableGen/X86DisassemblerTables.cpp @@ -18,6 +18,7 @@ #include "X86DisassemblerTables.h" #include "TableGenBackend.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" @@ -267,7 +268,7 @@ static const char* stringForModifierType(ModifierType mt) DisassemblerTables::DisassemblerTables() { unsigned i; - for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) { + for (i = 0; i < array_lengthof(Tables); i++) { Tables[i] = new ContextDecision; memset(Tables[i], 0, sizeof(ContextDecision)); } @@ -278,7 +279,7 @@ DisassemblerTables::DisassemblerTables() { DisassemblerTables::~DisassemblerTables() { unsigned i; - for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) + for (i = 0; i < array_lengthof(Tables); i++) delete Tables[i]; } |