Skip to content

Commit

Permalink
Use Modifiers::addArrayDimension
Browse files Browse the repository at this point in the history
This is preferable to accessing the field _arrayLengths directly.

Signed-off-by: Keith W. Campbell <keithc@ca.ibm.com>
  • Loading branch information
keithc-ca committed Sep 7, 2018
1 parent a36b671 commit ccc6012
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp
Expand Up @@ -463,10 +463,10 @@ DwarfScanner::getTypeInfo(Dwarf_Die die, Dwarf_Die *dieOut, string *typeName, Mo
break;
}
/* New array length is upperBound + 1. */
modifiers->_arrayLengths.push_back(upperBound + 1);
modifiers->addArrayDimension(upperBound + 1);
} else {
/* Arrays declared as "[]" have no size attributes. */
modifiers->_arrayLengths.push_back(0);
modifiers->addArrayDimension(0);
}
} while (DDR_RC_OK == getNextSibling(&child));
dwarf_dealloc(_debug, child, DW_DLA_DIE);
Expand Down

0 comments on commit ccc6012

Please sign in to comment.