Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Commit 09da188

Browse files
committed
Fix compile errors caused by merging stable into upstream-with-swift.
1 parent 38cebbf commit 09da188

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

include/lldb/Core/Module.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ class Module : public std::enable_shared_from_this<Module>,
454454
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
455455
TypeList &types);
456456

457+
size_t FindTypes(llvm::ArrayRef<CompilerContext> pattern, bool append,
458+
TypeMap &types);
459+
457460
lldb::TypeSP FindFirstType(const SymbolContext &sc,
458461
ConstString type_name, bool exact_match);
459462

source/Core/Module.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,16 @@ size_t Module::FindTypes(
10561056
return num_matches;
10571057
}
10581058

1059+
size_t Module::FindTypes(llvm::ArrayRef<CompilerContext> pattern, bool append,
1060+
TypeMap &types) {
1061+
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
1062+
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
1063+
if (SymbolFile *symbols = GetSymbolFile())
1064+
return symbols->FindTypes(pattern, append, types);
1065+
return 0;
1066+
1067+
}
1068+
10591069
SymbolFile *Module::GetSymbolFile(bool can_create, Stream *feedback_strm) {
10601070
if (!m_did_load_symfile.load()) {
10611071
std::lock_guard<std::recursive_mutex> guard(m_mutex);

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,11 +2542,8 @@ size_t SymbolFileDWARF::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
25422542
UpdateExternalModuleListIfNeeded();
25432543

25442544
for (const auto &pair : m_external_type_modules)
2545-
if (ModuleSP external_module_sp = pair.second) {
2546-
SymbolVendor *sym_vendor = external_module_sp->GetSymbolVendor();
2547-
if (sym_vendor)
2548-
num_matches += sym_vendor->FindTypes(pattern, true, types);
2549-
}
2545+
if (ModuleSP external_module_sp = pair.second)
2546+
num_matches += external_module_sp->FindTypes(pattern, true, types);
25502547
return num_matches;
25512548
}
25522549

source/Symbol/SwiftASTContext.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
#include "lldb/Symbol/ObjectFile.h"
105105
#include "lldb/Symbol/SourceModule.h"
106106
#include "lldb/Symbol/SymbolFile.h"
107+
#include "lldb/Symbol/TypeMap.h"
107108
#include "lldb/Symbol/VariableList.h"
108109
#include "lldb/Target/Platform.h"
109110
#include "lldb/Target/Process.h"
@@ -3250,7 +3251,7 @@ class SwiftDWARFImporterDelegate : public swift::DWARFImporterDelegate {
32503251
// Swift doesn't keep track of submodules.
32513252
decl_context.push_back({CompilerContextKind::AnyModule, ConstString()});
32523253
decl_context.push_back({GetCompilerContextKind(kind), ConstString(name)});
3253-
module->GetSymbolVendor()->FindTypes(decl_context, true, clang_types);
3254+
module->FindTypes(decl_context, true, clang_types);
32543255

32553256
clang::FileSystemOptions file_system_options;
32563257
clang::FileManager file_manager(file_system_options);
@@ -3282,7 +3283,7 @@ class SwiftDWARFImporterDelegate : public swift::DWARFImporterDelegate {
32823283
importer.Import(ClangUtil::GetQualType(compiler_type)));
32833284
if (!clang_type) {
32843285
llvm::consumeError(clang_type.takeError());
3285-
continue;
3286+
return true;
32863287
}
32873288

32883289
// Retrieve the imported type's Decl.

0 commit comments

Comments
 (0)