summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-08-06 09:12:42 +0000
committerPavel Labath <pavel@labath.sk>2019-08-06 09:12:42 +0000
commit465eae3669ed2046fead6ff0e43067bdf1eb1c81 (patch)
tree25098169d9810834da51dfcbf472914847e737e8 /lldb/source/Plugins
parent396521378f0a5c5373c0321e156de7cbcffb3cd3 (diff)
downloadbcm5719-llvm-465eae3669ed2046fead6ff0e43067bdf1eb1c81.tar.gz
bcm5719-llvm-465eae3669ed2046fead6ff0e43067bdf1eb1c81.zip
SymbolVendor: Remove passthrough methods
After the recent refactorings the SymbolVendor passthrough no longer serve any purpose. This patch removes those methods, and updates all callsites to go to the symbol file directly -- in most cases that just means calling GetSymbolFile()->foo() instead of GetSymbolVendor()->foo(). llvm-svn: 368001
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp27
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp6
4 files changed, 24 insertions, 29 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 53e9c2cca22..3841b594d15 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -18,7 +18,6 @@
#include "lldb/Symbol/CompilerDeclContext.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/TaggedASTType.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/Log.h"
@@ -815,11 +814,8 @@ void ClangASTSource::FindExternalVisibleDecls(
if (module_sp && namespace_decl) {
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
-
- if (symbol_vendor) {
- found_namespace_decl =
- symbol_vendor->FindNamespace(name, &namespace_decl);
+ if (SymbolFile *symbol_file = module_sp->GetSymbolFile()) {
+ found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
if (found_namespace_decl) {
context.m_namespace_map->push_back(
@@ -843,13 +839,12 @@ void ClangASTSource::FindExternalVisibleDecls(
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+ SymbolFile *symbol_file = image->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
- found_namespace_decl =
- symbol_vendor->FindNamespace(name, &namespace_decl);
+ found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
if (found_namespace_decl) {
context.m_namespace_map->push_back(
@@ -1885,13 +1880,13 @@ void ClangASTSource::CompleteNamespaceMap(
lldb::ModuleSP module_sp = i->first;
CompilerDeclContext module_parent_namespace_decl = i->second;
- SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
+ SymbolFile *symbol_file = module_sp->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
found_namespace_decl =
- symbol_vendor->FindNamespace(name, &module_parent_namespace_decl);
+ symbol_file->FindNamespace(name, &module_parent_namespace_decl);
if (!found_namespace_decl)
continue;
@@ -1917,13 +1912,13 @@ void ClangASTSource::CompleteNamespaceMap(
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+ SymbolFile *symbol_file = image->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
found_namespace_decl =
- symbol_vendor->FindNamespace(name, &null_namespace_decl);
+ symbol_file->FindNamespace(name, &null_namespace_decl);
if (!found_namespace_decl)
continue;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 52f855b639f..8a4e40dcd0a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -28,7 +28,7 @@
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeList.h"
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Target/Language.h"
@@ -148,8 +148,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
die.GetDeclContext(decl_context);
TypeMap dwo_types;
- if (!dwo_module_sp->GetSymbolVendor()->FindTypes(decl_context, true,
- dwo_types)) {
+ if (!dwo_module_sp->GetSymbolFile()->FindTypes(decl_context, true,
+ dwo_types)) {
if (!IsClangModuleFwdDecl(die))
return TypeSP();
@@ -159,8 +159,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
for (const auto &name_module : sym_file.getExternalTypeModules()) {
if (!name_module.second)
continue;
- SymbolVendor *sym_vendor = name_module.second->GetSymbolVendor();
- if (sym_vendor->FindTypes(decl_context, 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 11e3fcc8043..765982e70fa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -43,7 +43,7 @@
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
@@ -2438,11 +2438,11 @@ uint32_t SymbolFileDWARF::FindTypes(
for (const auto &pair : m_external_type_modules) {
ModuleSP external_module_sp = pair.second;
if (external_module_sp) {
- SymbolVendor *sym_vendor = external_module_sp->GetSymbolVendor();
- if (sym_vendor) {
+ SymbolFile *sym_file = external_module_sp->GetSymbolFile();
+ if (sym_file) {
const uint32_t num_external_matches =
- sym_vendor->FindTypes(name, parent_decl_ctx, append, max_matches,
- searched_symbol_files, types);
+ sym_file->FindTypes(name, parent_decl_ctx, append, max_matches,
+ searched_symbol_files, types);
if (num_external_matches)
return num_external_matches;
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 66303e4399b..af04d05e83b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -776,7 +776,7 @@ SymbolFileDWARFDebugMap::ResolveSymbolContext(const Address &exe_so_addr,
Address oso_so_addr;
if (oso_module->ResolveFileAddress(oso_file_addr, oso_so_addr)) {
resolved_flags |=
- oso_module->GetSymbolVendor()->ResolveSymbolContext(
+ oso_module->GetSymbolFile()->ResolveSymbolContext(
oso_so_addr, resolve_scope, sc);
}
}
@@ -1405,8 +1405,8 @@ bool SymbolFileDWARFDebugMap::LinkOSOAddress(Address &addr) {
if (addr_module == exe_module)
return true; // Address is already in terms of the main executable module
- CompileUnitInfo *cu_info = GetCompileUnitInfo(GetSymbolFileAsSymbolFileDWARF(
- addr_module->GetSymbolVendor()->GetSymbolFile()));
+ CompileUnitInfo *cu_info = GetCompileUnitInfo(
+ GetSymbolFileAsSymbolFileDWARF(addr_module->GetSymbolFile()));
if (cu_info) {
const lldb::addr_t oso_file_addr = addr.GetFileAddress();
const FileRangeMap::Entry *oso_range_entry =
OpenPOWER on IntegriCloud