Skip to content

Commit 8552c56

Browse files
committed
add special case handling of NSNotificationName
1 parent 26fa282 commit 8552c56

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
@@ -1775,6 +1775,13 @@ bool TypeSystemSwiftTypeRef::IsPossibleDynamicType(opaque_compiler_type_t type,
17751775
if (!type)
17761776
return false;
17771777

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

0 commit comments

Comments
 (0)