1
0
Fork 0

Change the order of symbol enumeration to be more natural

This commit is contained in:
Duncan Ogilvie 2022-05-14 14:38:18 +02:00
parent a031e037a4
commit ac0cf910a4
1 changed files with 18 additions and 18 deletions

View File

@ -553,24 +553,6 @@ bool PDBDiaFile::enumerateLexicalHierarchy(const Query_t & query)
uint32_t scopeId = getSymbolId(globalScope);
context.visited.insert(scopeId);
// Enumerate compilands.
{
CComPtr<IDiaEnumSymbols> enumSymbols;
hr = globalScope->findChildren(SymTagCompiland, nullptr, nsNone, &enumSymbols);
if(hr == S_OK)
{
while((hr = enumSymbols->Next(1, &symbol, &celt)) == S_OK && celt == 1)
{
CComPtr<IDiaSymbol> sym(symbol);
if(!enumerateCompilandScope(sym, context))
{
return false;
}
}
}
}
// Enumerate publics.
{
CComPtr<IDiaEnumSymbols> enumSymbols;
@ -634,6 +616,24 @@ bool PDBDiaFile::enumerateLexicalHierarchy(const Query_t & query)
}
}
// Enumerate compilands.
{
CComPtr<IDiaEnumSymbols> enumSymbols;
hr = globalScope->findChildren(SymTagCompiland, nullptr, nsNone, &enumSymbols);
if(hr == S_OK)
{
while((hr = enumSymbols->Next(1, &symbol, &celt)) == S_OK && celt == 1)
{
CComPtr<IDiaSymbol> sym(symbol);
if(!enumerateCompilandScope(sym, context))
{
return false;
}
}
}
}
return true;
}