[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
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 0fb4699..5052f3c 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -7452,7 +7452,7 @@
base_class->getType());
std::string base_class_type_name(
base_class_clang_type.GetTypeName().AsCString(""));
- if (base_class_type_name.compare(name) == 0)
+ if (base_class_type_name == name)
return child_idx;
++child_idx;
}