summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-08-22 19:24:55 +0000
committerAdrian Prantl <aprantl@apple.com>2019-08-22 19:24:55 +0000
commitaa3a564efa6b5fff2129f81a4041069a0233168f (patch)
tree230811320c2fff1889c8fcfa2d561dac57e6afc9 /lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
parent6c6dd6acf9e4a9d0599c99abbcbb696ed6b5ab19 (diff)
downloadbcm5719-llvm-aa3a564efa6b5fff2129f81a4041069a0233168f.tar.gz
bcm5719-llvm-aa3a564efa6b5fff2129f81a4041069a0233168f.zip
Extend FindTypes with CompilerContext to allow filtering by language.
This patch is also motivated by the Swift branch and is effectively NFC for the single-TypeSystem llvm.org branch. In multi-language projects it is extremely common to have, e.g., a Clang type and a similarly-named rendition of that same type in another language. When searching for a type It is much cheaper to pass a set of supported languages to the SymbolFile than having it materialize every result and then rejecting the materialized types that have the wrong language. Differential Revision: https://reviews.llvm.org/D66546 <rdar://problem/54471165> llvm-svn: 369690
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 51b84c4cae6..efd3b0cc940 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -1585,7 +1585,10 @@ void SymbolFilePDB::FindTypesByName(
}
size_t SymbolFilePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- bool append, lldb_private::TypeMap &types) {
+ LanguageSet languages, bool append,
+ lldb_private::TypeMap &types) {
+ if (!append)
+ types.Clear();
return 0;
}
OpenPOWER on IntegriCloud