Change the order of symbol enumeration to be more natural
This commit is contained in:
		
							parent
							
								
									a031e037a4
								
							
						
					
					
						commit
						ac0cf910a4
					
				| 
						 | 
					@ -553,24 +553,6 @@ bool PDBDiaFile::enumerateLexicalHierarchy(const Query_t & query)
 | 
				
			||||||
    uint32_t scopeId = getSymbolId(globalScope);
 | 
					    uint32_t scopeId = getSymbolId(globalScope);
 | 
				
			||||||
    context.visited.insert(scopeId);
 | 
					    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.
 | 
					    // Enumerate publics.
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        CComPtr<IDiaEnumSymbols> enumSymbols;
 | 
					        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;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue