Skip to content

Commit 0c84a46

Browse files
committed
Adapt LLDB to new ASTImporter API
rdar://107869141
1 parent c63572c commit 0c84a46

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
@@ -3888,13 +3888,17 @@ void SwiftASTContext::RegisterSectionModules(
38883888
if (!section_list)
38893889
return;
38903890

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

@@ -3903,9 +3907,10 @@ void SwiftASTContext::RegisterSectionModules(
39033907
module_names.push_back(module_name);
39043908
LOG_PRINTF(GetLog(LLDBLog::Types),
39053909
"parsed module \"%s\" from Swift AST section %zu/%zu in "
3906-
"image \"%s\".",
3910+
"image \"%s\" (filter=\"%s\").",
39073911
module_name.c_str(), n, total,
3908-
module.GetFileSpec().GetFilename().GetCString());
3912+
module.GetFileSpec().GetFilename().GetCString(),
3913+
filter.str().c_str());
39093914
}
39103915
};
39113916

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

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

0 commit comments

Comments
 (0)