Skip to content

Commit 7a05a8b

Browse files
author
git apple-llvm automerger
committed
Merge commit 'd64c6cffd7c5' from swift/release/6.1 into stable/20240723
2 parents 6110cb1 + d64c6cf commit 7a05a8b

File tree

4 files changed

+16
-24
lines changed

4 files changed

+16
-24
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,10 @@ bool SwiftLanguageRuntimeImpl::AddModuleToReflectionContext(
892892
return false;
893893
}
894894
bool found = HasReflectionInfo(obj_file);
895-
LLDB_LOG(GetLog(LLDBLog::Types), "{0} reflection metadata in \"{1}\"",
896-
found ? "Adding" : "No",
897-
module_sp->GetObjectName() ? module_sp->GetObjectName()
898-
: obj_file->GetFileSpec().GetFilename());
895+
LLDB_LOGV(GetLog(LLDBLog::Types), "{0} reflection metadata in \"{1}\"",
896+
found ? "Adding" : "No",
897+
module_sp->GetObjectName() ? module_sp->GetObjectName()
898+
: obj_file->GetFileSpec().GetFilename());
899899
if (!found)
900900
return true;
901901

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,9 +3109,9 @@ SwiftASTContext::CreateInstance(const SymbolContext &sc,
31093109
swift_ast_sp->RegisterSectionModules(*cur_module_sp, module_names);
31103110
if (GetLog(LLDBLog::Types)) {
31113111
std::string spacer(indent, '-');
3112-
LOG_PRINTF(GetLog(LLDBLog::Types), "+%s Dependency scan: %s",
3113-
spacer.c_str(),
3114-
cur_module_sp->GetSpecificationDescription().c_str());
3112+
LOG_VERBOSE_PRINTF(
3113+
GetLog(LLDBLog::Types), "+%s Dependency scan: %s", spacer.c_str(),
3114+
cur_module_sp->GetSpecificationDescription().c_str());
31153115
}
31163116
if (auto object = cur_module_sp->GetObjectFile()) {
31173117
FileSpecList file_list;
@@ -3125,9 +3125,9 @@ SwiftASTContext::CreateInstance(const SymbolContext &sc,
31253125
} else {
31263126
if (GetLog(LLDBLog::Types)) {
31273127
std::string spacer(indent, '-');
3128-
LOG_PRINTF(GetLog(LLDBLog::Types),
3129-
"+%s Could not find %s in images", spacer.c_str(),
3130-
fs.GetPath().c_str());
3128+
LOG_VERBOSE_PRINTF(GetLog(LLDBLog::Types),
3129+
"+%s Could not find %s in images",
3130+
spacer.c_str(), fs.GetPath().c_str());
31313131
}
31323132
}
31333133
}

lldb/test/API/lang/swift/reflection_loading/TestSwiftReflectionLoading.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def test(self):
1414
"""Test that reflection metadata is imported"""
1515
self.build()
1616

17-
log = self.getBuildArtifact("types.log")
18-
self.runCmd('log enable lldb types -f "%s"' % log)
17+
types_log = self.getBuildArtifact("types.log")
18+
self.runCmd('log enable lldb types -v -f "%s"' % types_log)
1919

2020
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
2121
self, 'Set breakpoint here', lldb.SBFileSpec('main.swift'),
@@ -26,14 +26,6 @@ def test(self):
2626
lldbutil.check_variable(self, var_c_x, value="23")
2727

2828
# Scan through the types log.
29-
import io
30-
logfile = io.open(log, "r", encoding='utf-8')
31-
found_exe = 0
32-
found_lib = 0
33-
for line in logfile:
34-
if re.search(r'Adding reflection metadata in .*a\.out', line):
35-
found_exe += 1
36-
if re.search(r'Adding reflection metadata in .*dynamic_lib', line):
37-
found_lib += 1
38-
self.assertEqual(found_exe, 1)
39-
self.assertEqual(found_lib, 1)
29+
self.filecheck('platform shell cat "%s"' % types_log, __file__)
30+
# CHECK: {{Adding reflection metadata in .*a\.out}}
31+
# CHECK: {{Adding reflection metadata in .*dynamic_lib}}

lldb/test/API/lang/swift/reflection_only/TestSwiftReflectionOnly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test(self):
1818
self, 'Set breakpoint here', lldb.SBFileSpec('main.swift'),
1919
extra_images=['dynamic_lib'])
2020
log = self.getBuildArtifact('types.log')
21-
self.expect('log enable lldb types -f ' + log)
21+
self.expect('log enable lldb types -v -f ' + log)
2222

2323
check_var = lldbutil.check_variable
2424
frame = thread.frames[0]

0 commit comments

Comments
 (0)