Skip to content

Commit 4c31358

Browse files
committed
add special case handling of NSNotificationName
(cherry picked from commit 8552c56)
1 parent 6f0563b commit 4c31358

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,13 @@ bool TypeSystemSwiftTypeRef::IsPossibleDynamicType(opaque_compiler_type_t type,
17731773
if (!type)
17741774
return false;
17751775

1776+
// This is a discrepancy with `SwiftASTContext`. The `impl` below correctly
1777+
// returns true, but `VALIDATE_AND_RETURN` will assert. This hardcoded
1778+
// handling of `__C.NSNotificationName` can be removed when the
1779+
// `VALIDATE_AND_RETURN` is removed.
1780+
if (GetMangledTypeName(type) == "$sSo18NSNotificationNameaD")
1781+
return true;
1782+
17761783
auto impl = [&]() {
17771784
using namespace swift::Demangle;
17781785
Demangler dem;

0 commit comments

Comments
 (0)