Add a Reserve method to RangeVector and RangeDataVector. Have the
DWARFCallFrameInfo method which returns a RangeVector pre-size the vector based on the number of entries it will be adding insted of growing the vector as items are added. llvm-svn: 177773
This commit is contained in:
parent
0827e97700
commit
ee7593fbff
|
|
@ -588,7 +588,13 @@ namespace lldb_private {
|
|||
{
|
||||
m_entries.clear();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Reserve (typename Collection::size_type size)
|
||||
{
|
||||
m_entries.resize (size);
|
||||
}
|
||||
|
||||
bool
|
||||
IsEmpty () const
|
||||
{
|
||||
|
|
@ -1137,7 +1143,13 @@ namespace lldb_private {
|
|||
{
|
||||
m_entries.clear();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Reserve (typename Collection::size_type size)
|
||||
{
|
||||
m_entries.resize (size);
|
||||
}
|
||||
|
||||
bool
|
||||
IsEmpty () const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ DWARFCallFrameInfo::GetFunctionAddressAndSizeVector (FunctionAddressAndSizeVecto
|
|||
{
|
||||
GetFDEIndex();
|
||||
const size_t count = m_fde_index.GetSize();
|
||||
function_info.Clear();
|
||||
function_info.Reserve(count);
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
const FDEEntryMap::Entry *func_offset_data_entry = m_fde_index.GetEntryAtIndex (i);
|
||||
|
|
|
|||
Loading…
Reference in New Issue