summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/Breakpad
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-08-22 21:45:58 +0000
committerAdrian Prantl <aprantl@apple.com>2019-08-22 21:45:58 +0000
commitaa97a89d832b5c0b7340d12fb3a889d78bdd62e7 (patch)
tree9944d8818d0cce27dae9666f02d6f65f9ff47073 /lldb/source/Plugins/SymbolFile/Breakpad
parentf88dfd8309b4f4852de657c41a29620f08f171a9 (diff)
downloadbcm5719-llvm-aa97a89d832b5c0b7340d12fb3a889d78bdd62e7.tar.gz
bcm5719-llvm-aa97a89d832b5c0b7340d12fb3a889d78bdd62e7.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> This reapplies r369690 with a previously missing constructor for LanguageSet. llvm-svn: 369710
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/Breakpad')
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp3
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index d5f51458eb1..494e2d487c7 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -319,7 +319,8 @@ uint32_t SymbolFileBreakpad::FindTypes(
}
size_t SymbolFileBreakpad::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- bool append, TypeMap &types) {
+ LanguageSet languages, bool append,
+ TypeMap &types) {
if (!append)
types.Clear();
return types.GetSize();
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index def975efc94..c066ae30ec8 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -116,8 +116,8 @@ public:
llvm::DenseSet<SymbolFile *> &searched_symbol_files,
TypeMap &types) override;
- size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern, bool append,
- TypeMap &types) override;
+ size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern,
+ LanguageSet languages, bool append, TypeMap &types) override;
llvm::Expected<TypeSystem &>
GetTypeSystemForLanguage(lldb::LanguageType language) override {
OpenPOWER on IntegriCloud