summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/Declaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/Declaration.cpp')
-rw-r--r--lldb/source/Symbol/Declaration.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lldb/source/Symbol/Declaration.cpp b/lldb/source/Symbol/Declaration.cpp
index d78ba967d280..4d0975d34256 100644
--- a/lldb/source/Symbol/Declaration.cpp
+++ b/lldb/source/Symbol/Declaration.cpp
@@ -90,12 +90,9 @@ bool Declaration::FileAndLineEqual(const Declaration &declaration) const {
bool lldb_private::operator==(const Declaration &lhs, const Declaration &rhs) {
#ifdef LLDB_ENABLE_DECLARATION_COLUMNS
- if (lhs.GetColumn() == rhs.GetColumn())
- if (lhs.GetLine() == rhs.GetLine())
- return lhs.GetFile() == rhs.GetFile();
+ if (lhs.GetColumn() != rhs.GetColumn())
+ return false;
#else
- if (lhs.GetLine() == rhs.GetLine())
- return FileSpec::Equal(lhs.GetFile(), rhs.GetFile(), true);
+ return lhs.GetLine() == rhs.GetLine() && lhs.GetFile() == rhs.GetFile();
#endif
- return false;
}