This commit is a combination of the following changes:
- Cache PDB's global scope (executable) in SymbolFilePDB
- Change naming of cu to compiland which is PDB specific
- Change ParseCompileUnitForSymIndex to ParseCompileUnitForUID. Prefer using a common name UID instead of PDB's System Index Adding one more argument index to this method, which is used to specify the index of the compile unit in a cached compile unit array
- Add GetPDBCompilandByUID method to simply code
- Fix a bug in getting the source file name for a PDB compiland. For some reason, PDBSymbolCompiland::getSourceFileName() could return an empty name, so if that is true, we have to walk through all source files of this compiland and determine the right source file used to generate this compiland based on language indicated.
The previous implementation called PDBSession::findOneSourceFile method to get its name for the compiland. This is not accurate since the one source file found could be a header other than source file.
Is this a performance win or just a convenience? I assumed the session itself would cache the global scope, but maybe that assumption was wrong.