Skip to content

[lldb] Stop printing debug messages for non-failing CompilerType comparisons #2225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,11 +1422,6 @@ static bool ContainsSugaredParen(swift::Demangle::NodePointer node) {
template <> bool Equivalent<CompilerType>(CompilerType l, CompilerType r) {
ConstString lhs = l.GetMangledTypeName();
ConstString rhs = r.GetMangledTypeName();
if (lhs != rhs) {
// Failure. Dump it for easier debugging.
llvm::dbgs() << "TypeSystemSwiftTypeRef diverges from SwiftASTContext: "
<< lhs.GetStringRef() << " != " << rhs.GetStringRef() << "\n";
}
if (lhs == ConstString("$sSiD") && rhs == ConstString("$sSuD"))
return true;
// Ignore missing sugar.
Expand Down Expand Up @@ -1454,7 +1449,13 @@ template <> bool Equivalent<CompilerType>(CompilerType l, CompilerType r) {
llvm::dyn_cast_or_null<TypeSystemSwiftTypeRef>(l.GetTypeSystem()))
if (ts->IsImportedType(l.GetOpaqueQualType(), nullptr))
return true;
return lhs == rhs;
if (lhs == rhs)
return true;

// Failure. Dump it for easier debugging.
llvm::dbgs() << "TypeSystemSwiftTypeRef diverges from SwiftASTContext: "
<< lhs.GetStringRef() << " != " << rhs.GetStringRef() << "\n";
return false;
}
/// This one is particularly taylored for GetTypeName() and
/// GetDisplayTypeName().
Expand Down