llvm.org GIT mirror llvm / 39d7cae
Use array_lengthof git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128823 91177308-0d34-0410-b5e6-96231b3b80d8 Joerg Sonnenberger 9 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1717 #include "X86DisassemblerTables.h"
1818
1919 #include "TableGenBackend.h"
20 #include "llvm/ADT/STLExtras.h"
2021 #include "llvm/Support/ErrorHandling.h"
2122 #include "llvm/Support/Format.h"
2223
266267 DisassemblerTables::DisassemblerTables() {
267268 unsigned i;
268269
269 for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++) {
270 for (i = 0; i < array_lengthof(Tables); i++) {
270271 Tables[i] = new ContextDecision;
271272 memset(Tables[i], 0, sizeof(ContextDecision));
272273 }
277278 DisassemblerTables::~DisassemblerTables() {
278279 unsigned i;
279280
280 for (i = 0; i < sizeof(Tables) / sizeof(Tables[0]); i++)
281 for (i = 0; i < array_lengthof(Tables); i++)
281282 delete Tables[i];
282283 }
283284