This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Have ArrayRef::copy() return a MutableArrayRef
ClosedPublic

Authored by int3 on Feb 18 2022, 10:05 AM.

Details

Summary

The allocated memory itself is mutable, so let's expose that to the
caller. LLD has a use case for this.

Diff Detail

Event Timeline

int3 created this revision.Feb 18 2022, 10:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 10:05 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a subscriber: dexonsmith. · View Herald Transcript
int3 requested review of this revision.Feb 18 2022, 10:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 10:05 AM
MaskRay accepted this revision.Feb 18 2022, 10:37 AM

Looks great! lld/MachO/ICF.cpp doesn't use std::uninitialized_copy yet. You will need to remove the change to lld/MachO.

This revision is now accepted and ready to land.Feb 18 2022, 10:37 AM
This revision was landed with ongoing or failed builds.Feb 18 2022, 11:56 AM
This revision was automatically updated to reflect the committed changes.