[Lldb-commits] [lldb] r147324 - in /lldb/trunk: include/lldb/Symbol/Symbol.h include/lldb/Symbol/Variable.h source/Symbol/Symbol.cpp source/Symbol/Symtab.cpp
Greg Clayton
gclayton at apple.com
Wed Dec 28 14:24:05 PST 2011
Author: gclayton
Date: Wed Dec 28 16:24:04 2011
New Revision: 147324
URL: http://llvm.org/viewvc/llvm-project?rev=147324&view=rev
Log:
Save a little bit of memory that was being reserved in a UniqueCStringMap
vector that can be sized to fit.
Modified:
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Symbol/Variable.h
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Symbol/Symtab.cpp
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=147324&r1=147323&r2=147324&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Wed Dec 28 16:24:04 2011
@@ -211,7 +211,6 @@
m_is_external:1, // non-zero if this symbol is globally visible
m_size_is_sibling:1, // m_size contains the index of this symbol's sibling
m_size_is_synthesized:1,// non-zero if this symbol's size was calculated using a delta between this symbol and the next
- m_searched_for_function:1,// non-zero if we have looked for the function associated with this symbol already.
m_type:8;
uint32_t m_flags; // A copy of the flags from the original symbol table, the ObjectFile plug-in can interpret these
AddressRange m_addr_range; // Contains the value, or the section offset address when the value is an address in a section, and the size (if any)
Modified: lldb/trunk/include/lldb/Symbol/Variable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Variable.h?rev=147324&r1=147323&r2=147324&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Variable.h (original)
+++ lldb/trunk/include/lldb/Symbol/Variable.h Wed Dec 28 16:24:04 2011
@@ -159,7 +159,7 @@
protected:
ConstString m_name; // The basename of the variable (no namespaces)
- Mangled m_mangled; // The mangled name of hte variable
+ Mangled m_mangled; // The mangled name of the variable
lldb::SymbolFileTypeSP m_symfile_type_sp; // The type pointer of the variable (int, struct, class, etc)
lldb::ValueType m_scope; // global, parameter, local
SymbolContextScope *m_owner_scope; // The symbol file scope that this variable was defined in
Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=147324&r1=147323&r2=147324&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Wed Dec 28 16:24:04 2011
@@ -30,7 +30,6 @@
m_is_external (false),
m_size_is_sibling (false),
m_size_is_synthesized (false),
- m_searched_for_function (false),
m_type (eSymbolTypeInvalid),
m_flags (),
m_addr_range ()
@@ -62,7 +61,6 @@
m_is_external (external),
m_size_is_sibling (false),
m_size_is_synthesized (false),
- m_searched_for_function (false),
m_type (type),
m_flags (flags),
m_addr_range (section, offset, size)
@@ -92,7 +90,6 @@
m_is_external (external),
m_size_is_sibling (false),
m_size_is_synthesized (false),
- m_searched_for_function (false),
m_type (type),
m_flags (flags),
m_addr_range (range)
@@ -110,7 +107,6 @@
m_is_external (rhs.m_is_external),
m_size_is_sibling (rhs.m_size_is_sibling),
m_size_is_synthesized (false),
- m_searched_for_function (false),
m_type (rhs.m_type),
m_flags (rhs.m_flags),
m_addr_range (rhs.m_addr_range)
@@ -132,7 +128,6 @@
m_is_external = rhs.m_is_external;
m_size_is_sibling = rhs.m_size_is_sibling;
m_size_is_synthesized = rhs.m_size_is_sibling;
- m_searched_for_function = rhs.m_searched_for_function;
m_type = rhs.m_type;
m_flags = rhs.m_flags;
m_addr_range = rhs.m_addr_range;
@@ -152,7 +147,6 @@
m_is_external = false;
m_size_is_sibling = false;
m_size_is_synthesized = false;
- m_searched_for_function = false;
m_type = eSymbolTypeInvalid;
m_flags = 0;
m_addr_range.Clear();
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=147324&r1=147323&r2=147324&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Wed Dec 28 16:24:04 2011
@@ -322,6 +322,7 @@
}
m_name_to_index.Sort();
+ m_name_to_index.SizeToFit();
}
}
More information about the lldb-commits
mailing list