diff options
author | Zachary Turner <zturner@google.com> | 2019-01-10 20:57:50 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2019-01-10 20:57:50 +0000 |
commit | 6dba121f18491a1cdc04f8cc305a7c6b52c24128 (patch) | |
tree | 6c162cf53cd09e1fe830a68e7a50b48959ee8f03 /source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | |
parent | 7096029b35fa3a65aa8e9446b9b7366285e1fe30 (diff) |
Change SymbolFile::ParseTypes to ParseTypesForCompileUnit.
The function SymbolFile::ParseTypes previously accepted a SymbolContext.
This makes it extremely difficult to implement faithfully, because you
have to account for all possible combinations of members being set in
the SymbolContext. On the other hand, no clients of this function
actually care about implementing this function to this strict of a
standard. AFAICT, there is actually only 1 client in the entire
codebase, and it is the function ParseAllDebugSymbols, which is itself
only called for testing purposes when dumping information. At this
call-site, the only field it sets is the CompileUnit, meaning that an
implementer of a SymbolFile need not worry about any examining or
handling any other fields which might be set.
By restricting this API to accept exactly a CompileUnit& and nothing
more, we can simplify the life of new SymbolFile plugin implementers by
making it clear exactly what the necessary and sufficient set of
functionality they need to implement is, while at the same time removing
some dead code that tried to handle other types of SymbolContext fields
that were never going to be set anyway.
Differential Revision: https://reviews.llvm.org/D56462
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@350889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
-rw-r--r-- | source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index 2ac0b985a..b9fdc1408 100644 --- a/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1274,7 +1274,7 @@ size_t SymbolFileNativePDB::FindTypesByName(llvm::StringRef name, return match_count; } -size_t SymbolFileNativePDB::ParseTypes(const SymbolContext &sc) { +size_t SymbolFileNativePDB::ParseTypesForCompileUnit(CompileUnit &comp_unit) { // Only do the full type scan the first time. if (m_done_full_type_scan) return 0; |