[lld/mac] Crash even less on undefined symbols with --icf=all
authorNico Weber <thakis@chromium.org>
Thu, 18 Nov 2021 21:59:21 +0000 (16:59 -0500)
committerNico Weber <thakis@chromium.org>
Fri, 19 Nov 2021 14:23:19 +0000 (09:23 -0500)
commitbc20bcb39e02e7b593fe0f50fe47959b635f5e56
treea54d84baa5f15f60e499d2e22231bf70c00f6ef9
parent4f9a5c2a1438c719f30f384c6bd9ac9290b882c0
[lld/mac] Crash even less on undefined symbols with --icf=all

Follow-up to https://reviews.llvm.org/D112643. Even after that change, we were
still asserting if two separate functions that are eligible for ICF (same size,
same data, same number of relocs, same reloc types, ...) referred to
Undefineds. This fixes that oversight.

Differential Revision: https://reviews.llvm.org/D114195
lld/MachO/ICF.cpp
lld/test/MachO/invalid/undefined-symbol.s