mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
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
This commit is contained in:
parent
528a510ba1
commit
db37e40723
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user