Skip to content

Commit 1a9664a

Browse files
authored
[lldb] Prevent spurious TypeRef type system validation message (NFC) (llvm#10193)
This fixes the following log output: ``` != != != ``` This was happening when both the TypeRef type system (lhs) and the SwiftASTContext (rhs) produced an empty `CompilerType` for some operation.
1 parent 45ecf12 commit 1a9664a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,13 +2544,12 @@ template <> bool Equivalent<CompilerType>(CompilerType l, CompilerType r) {
25442544
#else
25452545
// We allow the typeref typesystem to return a type where
25462546
// SwiftASTContext fails.
2547-
if (!l) {
2548-
llvm::dbgs() << l.GetMangledTypeName() << " != " << r.GetMangledTypeName()
2549-
<< "\n";
2547+
if (!l || !r) {
2548+
if (l || r)
2549+
llvm::dbgs() << l.GetMangledTypeName() << " != " << r.GetMangledTypeName()
2550+
<< "\n";
25502551
return !r;
25512552
}
2552-
if (!r)
2553-
return true;
25542553
#endif
25552554

25562555
// See comments in SwiftASTContext::ReconstructType(). For

0 commit comments

Comments
 (0)