[Lldb-commits] [lldb] r177776 - Don't bother calling Reserve on the vector unless we have entries to be added.

Jason Molenda jmolenda at apple.com
Fri Mar 22 16:42:09 PDT 2013


Author: jmolenda
Date: Fri Mar 22 18:42:09 2013
New Revision: 177776

URL: http://llvm.org/viewvc/llvm-project?rev=177776&view=rev
Log:
Don't bother calling Reserve on the vector unless we have entries to be added.

Modified:
    lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp

Modified: lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp?rev=177776&r1=177775&r2=177776&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp (original)
+++ lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp Fri Mar 22 18:42:09 2013
@@ -110,7 +110,8 @@ DWARFCallFrameInfo::GetFunctionAddressAn
     GetFDEIndex();
     const size_t count = m_fde_index.GetSize();
     function_info.Clear();
-    function_info.Reserve(count);
+    if (count > 0)
+        function_info.Reserve(count);
     for (size_t i = 0; i < count; ++i)
     {
         const FDEEntryMap::Entry *func_offset_data_entry = m_fde_index.GetEntryAtIndex (i);





More information about the lldb-commits mailing list