Skip to content

Commit dbfd484

Browse files
Merge pull request #6796 from adrian-prantl/107869141
Adapt LLDB to new ASTImporter API
2 parents f18ed27 + 0c84a46 commit dbfd484

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3889,13 +3889,17 @@ void SwiftASTContext::RegisterSectionModules(
38893889
if (!section_list)
38903890
return;
38913891

3892+
llvm::Triple filter = GetTriple();
38923893
auto parse_ast_section = [&](llvm::StringRef section_data_ref, size_t n,
38933894
size_t total) {
38943895
llvm::SmallVector<std::string, 4> swift_modules;
3895-
if (!swift::parseASTSection(*loader, section_data_ref, swift_modules)) {
3896+
if (!swift::parseASTSection(*loader, section_data_ref, filter,
3897+
swift_modules)) {
38963898
LOG_PRINTF(GetLog(LLDBLog::Types),
3897-
"failed to parse AST section %zu/%zu in image \"%s\".", n,
3898-
total, module.GetFileSpec().GetFilename().GetCString());
3899+
"failed to parse AST section %zu/%zu in image \"%s\" "
3900+
"(filter=\"%s\").",
3901+
n, total, module.GetFileSpec().GetFilename().GetCString(),
3902+
filter.str().c_str());
38993903
return;
39003904
}
39013905

@@ -3904,9 +3908,10 @@ void SwiftASTContext::RegisterSectionModules(
39043908
module_names.push_back(module_name);
39053909
LOG_PRINTF(GetLog(LLDBLog::Types),
39063910
"parsed module \"%s\" from Swift AST section %zu/%zu in "
3907-
"image \"%s\".",
3911+
"image \"%s\" (filter=\"%s\").",
39083912
module_name.c_str(), n, total,
3909-
module.GetFileSpec().GetFilename().GetCString());
3913+
module.GetFileSpec().GetFilename().GetCString(),
3914+
filter.str().c_str());
39103915
}
39113916
};
39123917

@@ -3927,8 +3932,10 @@ void SwiftASTContext::RegisterSectionModules(
39273932
// Grab all the AST blobs from the symbol vendor.
39283933
auto ast_file_datas = module.GetASTData(eLanguageTypeSwift);
39293934
LOG_PRINTF(GetLog(LLDBLog::Types),
3930-
"(\"%s\") retrieved %zu AST Data blobs from the symbol vendor.",
3931-
GetBriefModuleName(module).c_str(), ast_file_datas.size());
3935+
"(\"%s\") retrieved %zu AST Data blobs from the symbol vendor "
3936+
"(filter=\"%s\").",
3937+
GetBriefModuleName(module).c_str(), ast_file_datas.size(),
3938+
filter.str().c_str());
39323939

39333940
// Add each of the AST blobs to the vector of AST blobs for
39343941
// the module.

0 commit comments

Comments
 (0)