[ADT] Have ArrayRef::copy() return a MutableArrayRef
authorJez Ng <jezng@fb.com>
Fri, 18 Feb 2022 19:56:16 +0000 (14:56 -0500)
committerJez Ng <jezng@fb.com>
Fri, 18 Feb 2022 19:56:16 +0000 (14:56 -0500)
commit0712c575b90a7eb508bf43d15c38c1c0b0d69695
tree32510a390a2b8ac85cca056c0307a9c9c8b64209
parent60210f9acbd760272856495175636bc2da0b1fcd
[ADT] Have ArrayRef::copy() return a MutableArrayRef

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

Reviewed By: MaskRay, #lld-macho

Differential Revision: https://reviews.llvm.org/D120144
llvm/include/llvm/ADT/ArrayRef.h