Skip to content

Commit 40349c7

Browse files
Merge pull request #1874 from adrian-prantl/cleanup-unused
Remove what appears to be unnecessary code
2 parents 5ed674d + 9601689 commit 40349c7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,6 @@ static void AddVariableInfo(
615615
var_type = valobj_sp->GetCompilerType();
616616
}
617617

618-
if (!var_type.IsValid())
619-
if (Type *var_lldb_type = variable_sp->GetType())
620-
var_type = var_lldb_type->GetFullCompilerType();
621-
622618
if (!var_type.IsValid())
623619
return;
624620

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,9 @@ bool Equivalent<llvm::Optional<uint64_t>>(llvm::Optional<uint64_t> l,
12041204
// thus assume that a larger number is "better".
12051205
if (l.hasValue() && r.hasValue() && *l > *r)
12061206
return true;
1207+
// Assume that any value is "better" than none.
1208+
if (l.hasValue() && !r.hasValue())
1209+
return true;
12071210
llvm::dbgs() << l << " != " << r << "\n";
12081211
return false;
12091212
}

0 commit comments

Comments
 (0)