diff options
| author | Aaron Smith <aaron.smith@microsoft.com> | 2018-01-13 06:58:18 +0000 |
|---|---|---|
| committer | Aaron Smith <aaron.smith@microsoft.com> | 2018-01-13 06:58:18 +0000 |
| commit | 10a02577eaf46b0d21663d78f8604c84ec6e56f5 (patch) | |
| tree | 354cadec7e9148af27cb9053d17c0980f256a5b7 /lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | |
| parent | 6f109f8c6c24c8547976aff1f0649ef505d4c3ef (diff) | |
| download | bcm5719-llvm-10a02577eaf46b0d21663d78f8604c84ec6e56f5.tar.gz bcm5719-llvm-10a02577eaf46b0d21663d78f8604c84ec6e56f5.zip | |
[lldb] Add support to cache a PDB's global scope and fix a bug in getting the source file name for a compiland
Summary:
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.
Reviewers: zturner, lldb-commits
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41428
llvm-svn: 322433
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 7802d6f0d85..266804e8534 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -128,8 +128,6 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { return nullptr; std::string name = type_def->getName(); uint64_t bytes = type_def->getLength(); - if (!target_type) - return nullptr; CompilerType target_ast_type = target_type->GetFullCompilerType(); CompilerDeclContext target_decl_ctx = m_ast.GetSymbolFile()->GetDeclContextForUID(target_type->GetID()); |

