Skip to content

Commit c8c26f4

Browse files
Merge pull request #3095 from adrian-prantl/invalid
Handle invalid types in Equivalent (NFC)
2 parents adccfb0 + 2b7a614 commit c8c26f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,8 @@ StripPrivateIDs(swift::Demangle::Demangler &dem,
14581458
/// Compare two swift types from different type systems by comparing their
14591459
/// (canonicalized) mangled name.
14601460
template <> bool Equivalent<CompilerType>(CompilerType l, CompilerType r) {
1461+
if (!l || !r)
1462+
return !l && !r;
14611463
// See comments in SwiftASTContext::ReconstructType(). For
14621464
// SILFunctionTypes the mapping isn't bijective.
14631465
auto *ast_ctx = llvm::cast<SwiftASTContext>(r.GetTypeSystem());

0 commit comments

Comments
 (0)