summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-03-26 23:03:23 +0000
committerGreg Clayton <gclayton@apple.com>2012-03-26 23:03:23 +0000
commit84db9105d24a326f35054f103fbb468eb6d9bfeb (patch)
treef2d1a6c18e9f3b6843cba0e65ed5c89ac3fbbfcd /lldb/source/Core/ModuleList.cpp
parent98e5d863ad3515ff119d120a1eb40c1c6a345443 (diff)
downloadbcm5719-llvm-84db9105d24a326f35054f103fbb468eb6d9bfeb.tar.gz
bcm5719-llvm-84db9105d24a326f35054f103fbb468eb6d9bfeb.zip
<rdar://problem/11113279>
Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method. This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB. llvm-svn: 153482
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 0cc97988029..b612a0cd9d8 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -352,19 +352,16 @@ ModuleList::FindModule (const UUID &uuid)
uint32_t
-ModuleList::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
+ModuleList::FindTypes2 (const SymbolContext& sc, const ConstString &name, bool name_is_fully_qualified, uint32_t max_matches, TypeList& types)
{
Mutex::Locker locker(m_modules_mutex);
-
- if (!append)
- types.Clear();
uint32_t total_matches = 0;
collection::const_iterator pos, end = m_modules.end();
for (pos = m_modules.begin(); pos != end; ++pos)
{
if (sc.module_sp.get() == NULL || sc.module_sp.get() == (*pos).get())
- total_matches += (*pos)->FindTypes (sc, name, NULL, true, max_matches, types);
+ total_matches += (*pos)->FindTypes (sc, name, name_is_fully_qualified, max_matches, types);
if (total_matches >= max_matches)
break;
OpenPOWER on IntegriCloud