This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Don't crash on 32-bit output binaries when dead-stripping
ClosedPublic

Authored by thakis on Jul 3 2021, 6:59 PM.

Details

Summary

Fixes PR50974.

Diff Detail

Event Timeline

thakis created this revision.Jul 3 2021, 6:59 PM
Herald added a reviewer: gkm. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Jul 3 2021, 6:59 PM

This is not the same as std::numeric_limits<Ptr>::max()?

thakis added a comment.Jul 4 2021, 5:01 AM

This is not the same as std::numeric_limits<Ptr>::max()?

Yes, it's the same.

This is not the same as std::numeric_limits<Ptr>::max()?

Yes, it's the same.

static_cast+ Macro feels hacky. numeric_limits is more descriptive.

static_cast+ Macro feels hacky. numeric_limits is more descriptive.

I don't see any advantage to numeric_limits here.

int3 accepted this revision.Jul 4 2021, 12:56 PM

+1 for numeric_limits, it "constructs" the right value, whereas static_cast is "converting" the wrong value into the right one. but feel free to ignore :)

This revision is now accepted and ready to land.Jul 4 2021, 12:56 PM
thakis added a comment.Jul 4 2021, 3:04 PM

Fine, landed with numeric_limits.

Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2021, 3:04 PM