[Lldb-commits] [lldb] r373342 - Update SymbolFilePDB for FindTypes API change.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 1 08:29:33 PDT 2019
Author: adrian
Date: Tue Oct 1 08:29:33 2019
New Revision: 373342
URL: http://llvm.org/viewvc/llvm-project?rev=373342&view=rev
Log:
Update SymbolFilePDB for FindTypes API change.
This is untested, I don't have access to a Windows machine.
Modified:
lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=373342&r1=373341&r2=373342&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Tue Oct 1 08:29:33 2019
@@ -1441,7 +1441,7 @@ void SymbolFilePDB::AddSymbols(lldb_priv
symtab.Finalize();
}
-uint32_t SymbolFilePDB::FindTypes(
+void SymbolFilePDB::FindTypes(
lldb_private::ConstString name,
const lldb_private::CompilerDeclContext *parent_decl_ctx,
uint32_t max_matches,
@@ -1449,17 +1449,15 @@ uint32_t SymbolFilePDB::FindTypes(
lldb_private::TypeMap &types) {
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
if (!name)
- return 0;
+ return;
if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
- return 0;
+ return;
searched_symbol_files.clear();
searched_symbol_files.insert(this);
// There is an assumption 'name' is not a regex
FindTypesByName(name.GetStringRef(), parent_decl_ctx, max_matches, types);
-
- return types.GetSize();
}
void SymbolFilePDB::DumpClangAST(Stream &s) {
@@ -1582,11 +1580,9 @@ void SymbolFilePDB::FindTypesByName(
}
}
-size_t SymbolFilePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages,
- lldb_private::TypeMap &types) {
- return 0;
-}
+void SymbolFilePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
+ LanguageSet languages,
+ lldb_private::TypeMap &types) {}
void SymbolFilePDB::GetTypesForPDBSymbol(const llvm::pdb::PDBSymbol &pdb_symbol,
uint32_t type_mask,
@@ -1638,9 +1634,9 @@ void SymbolFilePDB::GetTypesForPDBSymbol
GetTypesForPDBSymbol(*symbol_up, type_mask, type_collection);
}
-size_t SymbolFilePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
- TypeClass type_mask,
- lldb_private::TypeList &type_list) {
+void SymbolFilePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
+ TypeClass type_mask,
+ lldb_private::TypeList &type_list) {
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
TypeCollection type_collection;
uint32_t old_size = type_list.GetSize();
@@ -1649,7 +1645,7 @@ size_t SymbolFilePDB::GetTypes(lldb_priv
if (cu) {
auto compiland_up = GetPDBCompilandByUID(cu->GetID());
if (!compiland_up)
- return 0;
+ return;
GetTypesForPDBSymbol(*compiland_up, type_mask, type_collection);
} else {
for (uint32_t cu_idx = 0; cu_idx < GetNumCompileUnits(); ++cu_idx) {
@@ -1665,7 +1661,6 @@ size_t SymbolFilePDB::GetTypes(lldb_priv
type->GetForwardCompilerType();
type_list.Insert(type->shared_from_this());
}
- return type_list.GetSize() - old_size;
}
llvm::Expected<lldb_private::TypeSystem &>
Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h?rev=373342&r1=373341&r2=373342&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h Tue Oct 1 08:29:33 2019
@@ -125,23 +125,23 @@ public:
void AddSymbols(lldb_private::Symtab &symtab) override;
- uint32_t
+ void
FindTypes(lldb_private::ConstString name,
const lldb_private::CompilerDeclContext *parent_decl_ctx,
uint32_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
lldb_private::TypeMap &types) override;
- size_t FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
- lldb_private::LanguageSet languages,
- lldb_private::TypeMap &types) override;
+ void FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
+ lldb_private::LanguageSet languages,
+ lldb_private::TypeMap &types) override;
void FindTypesByRegex(const lldb_private::RegularExpression ®ex,
uint32_t max_matches, lldb_private::TypeMap &types);
- size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
- lldb::TypeClass type_mask,
- lldb_private::TypeList &type_list) override;
+ void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+ lldb::TypeClass type_mask,
+ lldb_private::TypeList &type_list) override;
llvm::Expected<lldb_private::TypeSystem &>
GetTypeSystemForLanguage(lldb::LanguageType language) override;
More information about the lldb-commits
mailing list