From aa3a564efa6b5fff2129f81a4041069a0233168f Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 22 Aug 2019 19:24:55 +0000 Subject: 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 llvm-svn: 369690 --- lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp') diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index 32b13c950c02..05e48787cbeb 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1270,7 +1270,10 @@ uint32_t SymbolFileNativePDB::FindTypes( } size_t SymbolFileNativePDB::FindTypes(llvm::ArrayRef pattern, - bool append, TypeMap &types) { + LanguageSet languages, bool append, + TypeMap &types) { + if (!append) + types.Clear(); return 0; } -- cgit v1.2.3