summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-12-21 22:46:10 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-12-21 22:46:10 +0000
commit8d20cfdfc6c26533a87c525cb6e8dbc50a65e036 (patch)
tree9cc24b8bbe759b58af831d12959270bcfdb88725 /lldb/source/Core/Module.cpp
parentb42963716801ac344dbc8efdfe42f4a2ff7b0b99 (diff)
downloadbcm5719-llvm-8d20cfdfc6c26533a87c525cb6e8dbc50a65e036.tar.gz
bcm5719-llvm-8d20cfdfc6c26533a87c525cb6e8dbc50a65e036.zip
[NFC] Replace `compare` with (in)equality operator where applicable.
Using compare is verbose, bug prone and potentially inefficient (because of early termination). Replace relevant call sites with the (in)equality operator. llvm-svn: 349972
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 76c898fc0cd..a53d54fb103 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -783,7 +783,7 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
qualified_name = cpp_method.GetBasename().str();
else
qualified_name = cpp_method.GetScopeQualifiedName();
- if (qualified_name.compare(m_name.GetCString()) != 0) {
+ if (qualified_name != m_name.GetCString()) {
sc_list.RemoveContextAtIndex(i);
continue;
}
OpenPOWER on IntegriCloud