mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
Use array_lengthof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128823 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
229e4523f2
commit
39d7caea69
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user