Skip to content

Commit 895f7da

Browse files
committed
Add error logging when reflection metadata loadign fails
1 parent cdbce45 commit 895f7da

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,14 @@ bool SwiftLanguageRuntimeImpl::AddModuleToReflectionContext(
921921
likely_module_names);
922922
}
923923

924-
if (info_id)
925-
if (auto *swift_metadata_cache = GetSwiftMetadataCache())
924+
if (!info_id) {
925+
LLDB_LOG(GetLog(LLDBLog::Types),
926+
"Error while loading reflection metadata in \"{0}\"",
927+
module_sp->GetObjectName());
928+
return false;
929+
}
930+
931+
if (auto *swift_metadata_cache = GetSwiftMetadataCache())
926932
swift_metadata_cache->registerModuleWithReflectionInfoID(module_sp,
927933
*info_id);
928934

0 commit comments

Comments
 (0)