Skip to content

Commit 446bd76

Browse files
committed
[lldb] Check for known Swift stdlib symbol in IsStaticSwiftRuntime
"_swift_release_dealloc" is not present when compiling a binary in embedded Swift mode, but "swift_release" is
1 parent e47653c commit 446bd76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ enum class RuntimeKind { Swift, ObjC };
119119

120120
/// Detect a statically linked Swift runtime by looking for a well-known symbol.
121121
static bool IsStaticSwiftRuntime(Module &image) {
122-
static ConstString swift_release_dealloc_sym("_swift_release_dealloc");
123-
return image.FindFirstSymbolWithNameAndType(swift_release_dealloc_sym);
122+
static ConstString swift_reflection_version_sym("swift_release");
123+
return image.FindFirstSymbolWithNameAndType(swift_reflection_version_sym);
124124
}
125125

126126
/// \return the Swift or Objective-C runtime found in the loaded images.

0 commit comments

Comments
 (0)