[lld] d9b55cb - [lld][MachO][NFC] Remove redundant size checks (#215411)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 08:35:51 PDT 2026
Author: Ellis Hoag
Date: 2026-08-12T08:35:44-07:00
New Revision: d9b55cbef8d80b17c1e1ca42d0e3e1839b70e09a
URL: https://github.com/llvm/llvm-project/commit/d9b55cbef8d80b17c1e1ca42d0e3e1839b70e09a
DIFF: https://github.com/llvm/llvm-project/commit/d9b55cbef8d80b17c1e1ca42d0e3e1839b70e09a.diff
LOG: [lld][MachO][NFC] Remove redundant size checks (#215411)
Added:
Modified:
lld/MachO/ICF.cpp
Removed:
################################################################################
diff --git a/lld/MachO/ICF.cpp b/lld/MachO/ICF.cpp
index c7b408ac6df18..1c199913bf900 100644
--- a/lld/MachO/ICF.cpp
+++ b/lld/MachO/ICF.cpp
@@ -100,12 +100,8 @@ bool ICF::equalsConstant(const ConcatInputSection *ia,
// We can only fold within the same OutputSection.
if (ia->parent != ib->parent)
return false;
- if (ia->data.size() != ib->data.size())
- return false;
if (ia->data != ib->data)
return false;
- if (ia->relocs.size() != ib->relocs.size())
- return false;
auto f = [](const Relocation &ra, const Relocation &rb) {
if (ra.type != rb.type)
return false;
More information about the llvm-commits
mailing list