[ELF] Rename Symbol::compare to shouldReplace. NFC
The return value is not a boolean instead of a tri-state.
Suggested by Peter Smith in D120640.
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 484ad8e..8b74725 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -508,7 +508,7 @@
}
// Compare two symbols. Return true if the new symbol should win.
-bool Symbol::compare(const Defined &other) const {
+bool Symbol::shouldReplace(const Defined &other) const {
if (LLVM_UNLIKELY(isCommon())) {
if (config->warnCommon)
warn("common " + getName() + " is overridden");
@@ -605,7 +605,7 @@
}
void Symbol::resolveDefined(const Defined &other) {
- if (compare(other))
+ if (shouldReplace(other))
replace(other);
}