mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
<rdar://problem/12408181> Fixing a bug where we would try to look for types in a module, and then fail to look for them anywhere else because the same SymbolContext was being passed everywhere
llvm-svn: 165169
This commit is contained in:
@@ -454,13 +454,14 @@ ModuleList::FindTypes (const SymbolContext& sc, const ConstString &name, bool na
|
||||
|
||||
if (total_matches < max_matches)
|
||||
{
|
||||
SymbolContext world_sc;
|
||||
for (pos = m_modules.begin(); pos != end; ++pos)
|
||||
{
|
||||
// Search the module if the module is not equal to the one in the symbol
|
||||
// context "sc". If "sc" contains a empty module shared pointer, then
|
||||
// the comparisong will always be true (valid_module_ptr != NULL).
|
||||
if (sc.module_sp.get() != (*pos).get())
|
||||
total_matches += (*pos)->FindTypes (sc, name, name_is_fully_qualified, max_matches, types);
|
||||
total_matches += (*pos)->FindTypes (world_sc, name, name_is_fully_qualified, max_matches, types);
|
||||
|
||||
if (total_matches >= max_matches)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user