Page MenuHomePhabricator

[lld-macho][nfc] Put back shouldOmitFromOutput() asserts
ClosedPublic

Authored by int3 on Jun 11 2021, 7:01 PM.

Details

Summary

I removed them in rG5de7467e982 but @thakis pointed out that
they were useful to keep, so here they are again. I've also converted
the !isCoalescedWeak() asserts into !shouldOmitFromOutput() asserts,
since the latter check subsumes the former.

Diff Detail

Event Timeline

int3 created this revision.Jun 11 2021, 7:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Jun 11 2021, 7:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2021, 7:01 PM
int3 retitled this revision from [lld-macho] Put back shouldOmitFromOutput() asserts to [lld-macho][nfc] Put back shouldOmitFromOutput() asserts.Jun 13 2021, 10:55 AM
thakis added inline comments.Jun 14 2021, 9:41 AM
lld/MachO/MapFile.cpp
69

(this used to check coalescedWeak() because it's in a !isLive() check and then shouldOmit is just isCoalesced, but this is fine as-is too)

lld/MachO/UnwindInfoSection.cpp
177

Hm, is this correct? See the FIXME at the start of the loop. It's correct to assert that this isn't a coalesced weak, but it might be a non-live symbol I think. (But not sure.)

int3 updated this revision to Diff 351933.Jun 14 2021, 11:00 AM

use isCoalescedWeak

int3 marked an inline comment as done.Jun 14 2021, 11:00 AM
int3 added inline comments.
lld/MachO/UnwindInfoSection.cpp
177

good point -- I've switched it back to use isCoalescedWeak().

thakis accepted this revision.Jun 16 2021, 11:19 AM

Thanks!

This revision is now accepted and ready to land.Jun 16 2021, 11:19 AM
This revision was automatically updated to reflect the committed changes.
int3 marked an inline comment as done.