summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-08-22 20:41:16 +0000
committerAdrian Prantl <aprantl@apple.com>2019-08-22 20:41:16 +0000
commitb041602e3fe330368200a925c18af4d5e0df155c (patch)
tree55290996dd526619f05d96484bf657230b8eac07 /lldb/source/Plugins
parentdddc0fd9cbba726a82a1f6b88015fa73dd2643c6 (diff)
downloadbcm5719-llvm-b041602e3fe330368200a925c18af4d5e0df155c.tar.gz
bcm5719-llvm-b041602e3fe330368200a925c18af4d5e0df155c.zip
Revert Extend FindTypes with CompilerContext to allow filtering by language.
This reverts r369690 (git commit aa3a564efa6b5fff2129f81a4041069a0233168f) llvm-svn: 369702
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp3
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp9
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h3
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp5
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp5
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h3
9 files changed, 13 insertions, 29 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index 494e2d487c7..d5f51458eb1 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -319,8 +319,7 @@ uint32_t SymbolFileBreakpad::FindTypes(
}
size_t SymbolFileBreakpad::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages, bool append,
- TypeMap &types) {
+ 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 c066ae30ec8..def975efc94 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,
- LanguageSet languages, bool append, TypeMap &types) override;
+ size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern, bool append,
+ TypeMap &types) override;
llvm::Expected<TypeSystem &>
GetTypeSystemForLanguage(lldb::LanguageType language) override {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 8956a4f5c0f..5ef46ef3239 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -148,10 +148,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
die.GetDeclContext(decl_context);
TypeMap dwo_types;
- // The type in the Clang module must have the same langage as the current CU.
- LanguageSet languages;
- languages.Insert(die.GetCU()->GetLanguageType());
- if (!dwo_module_sp->GetSymbolFile()->FindTypes(decl_context, languages, true,
+ if (!dwo_module_sp->GetSymbolFile()->FindTypes(decl_context, true,
dwo_types)) {
if (!IsClangModuleFwdDecl(die))
return TypeSP();
@@ -162,8 +159,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
for (const auto &name_module : sym_file.getExternalTypeModules()) {
if (!name_module.second)
continue;
- if (name_module.second->GetSymbolFile()->FindTypes(
- decl_context, languages, true, dwo_types))
+ if (name_module.second->GetSymbolFile()->FindTypes(decl_context, true,
+ dwo_types))
break;
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 6b357c249ce..ba63b41a581 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2485,8 +2485,7 @@ uint32_t SymbolFileDWARF::FindTypes(
}
size_t SymbolFileDWARF::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages, bool append,
- TypeMap &types) {
+ bool append, TypeMap &types) {
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
if (!append)
types.Clear();
@@ -2509,9 +2508,6 @@ size_t SymbolFileDWARF::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
DWARFDIE die = GetDIE(die_ref);
if (die) {
- if (!languages[die.GetCU()->GetLanguageType()])
- continue;
-
llvm::SmallVector<CompilerContext, 4> die_context;
die.GetDeclContext(die_context);
if (!contextMatches(die_context, pattern))
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 2a1eb8ab9ab..0d59013b014 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -185,8 +185,7 @@ public:
lldb_private::TypeMap &types) override;
size_t FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
- lldb_private::LanguageSet languages, bool append,
- lldb_private::TypeMap &types) override;
+ bool append, lldb_private::TypeMap &types) override;
size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
lldb::TypeClass type_mask,
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 05e48787cbe..32b13c950c0 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1270,10 +1270,7 @@ uint32_t SymbolFileNativePDB::FindTypes(
}
size_t SymbolFileNativePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages, bool append,
- TypeMap &types) {
- if (!append)
- types.Clear();
+ bool append, TypeMap &types) {
return 0;
}
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index f2e840cdfc1..f64fb4f4252 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -134,8 +134,8 @@ public:
llvm::DenseSet<SymbolFile *> &searched_symbol_files,
TypeMap &types) override;
- size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages, bool append, TypeMap &types) override;
+ size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern, bool append,
+ TypeMap &types) override;
llvm::Expected<TypeSystem &>
GetTypeSystemForLanguage(lldb::LanguageType language) override;
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index efd3b0cc940..51b84c4cae6 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -1585,10 +1585,7 @@ void SymbolFilePDB::FindTypesByName(
}
size_t SymbolFilePDB::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
- LanguageSet languages, bool append,
- lldb_private::TypeMap &types) {
- if (!append)
- types.Clear();
+ bool append, lldb_private::TypeMap &types) {
return 0;
}
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
index a360a18ae26..15eed0f9f6c 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -133,8 +133,7 @@ public:
lldb_private::TypeMap &types) override;
size_t FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
- lldb_private::LanguageSet languages, bool append,
- lldb_private::TypeMap &types) override;
+ bool append, lldb_private::TypeMap &types) override;
void FindTypesByRegex(const lldb_private::RegularExpression &regex,
uint32_t max_matches, lldb_private::TypeMap &types);
OpenPOWER on IntegriCloud