Skip to content

Commit b6c77e4

Browse files
committed
[lldb] Prevent spurious TypeRef type system validation message (NFC) (#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. (cherry-picked from commit 1a9664a)
1 parent 5871d27 commit b6c77e4

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
@@ -2531,13 +2531,12 @@ template <> bool Equivalent<CompilerType>(CompilerType l, CompilerType r) {
25312531
#else
25322532
// We allow the typeref typesystem to return a type where
25332533
// SwiftASTContext fails.
2534-
if (!l) {
2535-
llvm::dbgs() << l.GetMangledTypeName() << " != " << r.GetMangledTypeName()
2536-
<< "\n";
2534+
if (!l || !r) {
2535+
if (l || r)
2536+
llvm::dbgs() << l.GetMangledTypeName() << " != " << r.GetMangledTypeName()
2537+
<< "\n";
25372538
return !r;
25382539
}
2539-
if (!r)
2540-
return true;
25412540
#endif
25422541

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

0 commit comments

Comments
 (0)