Skip to content

Commit fc3a749

Browse files
Merge pull request #2756 from adrian-prantl/73172674
Add provenance information to the collected import options in the typ
2 parents 162c9a8 + 6cafa2d commit fc3a749

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

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

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,10 +2166,12 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
21662166
}
21672167

21682168
if (!add_it) {
2169-
LOG_PRINTF(LIBLLDB_LOG_TYPES,
2170-
"process_one_module rejecting framework path \"%s\" "
2171-
"as it has no Headers or Modules subdirectories.",
2172-
framework_path.c_str());
2169+
LOG_PRINTF(
2170+
LIBLLDB_LOG_TYPES,
2171+
"process_one_module(\"%s\") rejecting framework path \"%s\" "
2172+
"as it has no \"Headers\" or \"Modules\" subdirectories.",
2173+
module_file.GetFilename().AsCString(""),
2174+
framework_path.c_str());
21732175
}
21742176

21752177
if (add_it) {
@@ -2187,6 +2189,11 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
21872189
// SDK instead.
21882190
if (!StringRef(parent_path).startswith("/System/Library") &&
21892191
!IsDeviceSupport(parent_path.c_str()))
2192+
LOG_PRINTF(LIBLLDB_LOG_TYPES,
2193+
"process_one_module(\"%s\") adding framework path "
2194+
"\"%s\".",
2195+
module_file.GetFilename().AsCString(""),
2196+
framework_path.c_str());
21902197
framework_search_paths.push_back(
21912198
{std::move(parent_path), /*system*/ false});
21922199
}
@@ -2223,7 +2230,13 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
22232230
opts.ImportSearchPaths.end());
22242231
for (const auto &fwsp : opts.FrameworkSearchPaths)
22252232
framework_search_paths.push_back({fwsp.Path, fwsp.IsSystem});
2226-
2233+
if (lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET))
2234+
for (const std::string &arg : ast_context->GetClangArguments()) {
2235+
LOG_PRINTF(
2236+
LIBLLDB_LOG_TYPES,
2237+
"process_one_module(\"%s\") adding Clang argument \"%s\".",
2238+
module_file.GetFilename().AsCString(""), arg.c_str());
2239+
}
22272240
swift_ast_sp->AddExtraClangArgs(ast_context->GetClangArguments());
22282241
}
22292242
}

lldb/test/API/lang/swift/system_framework/TestSwiftSystemFramework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_system_framework(self):
2626
neg = 0
2727
with open(log, "r") as logfile:
2828
for line in logfile:
29-
if "process_one_module rejecting framework path" in line:
29+
if ") rejecting framework path " in line:
3030
pos += 1
3131
elif "/System/Library/Frameworks" in line:
3232
neg += 1

0 commit comments

Comments
 (0)