[llvm][ADT] Add deduction guides for `MutableArrayRef`
authorJoe Loser <joeloser@fastmail.com>
Mon, 9 Jan 2023 22:37:11 +0000 (15:37 -0700)
committerJoe Loser <joeloser@fastmail.com>
Tue, 10 Jan 2023 20:02:34 +0000 (13:02 -0700)
commit38791259c1165cedfa313e06dc20e443f1e20634
tree084224acc86c6d73dbba681e538a069d6bf039d0
parent9f3081dc6fe8447e85741865846840bc491866e5
[llvm][ADT] Add deduction guides for `MutableArrayRef`

Similar to https://reviews.llvm.org/D140896, this adds deduction guides for the
counterpart of `ArrayRef`: `MutableArrayRef`.  The update plan is the following:

1) Add deduction guides for `MutableArrayRef`.
2) Change uses in-tree from `makeMutableArrayRef` to use deduction guides
3) Mark `makeMutableArrayRef` as deprecated for some time before removing to
   give downstream users time to update.

The deduction guides are similar to those provided by the `makeMutableArrayRef`
function templates, except we don't need one explicitly from `MutableArrayRef`.

Differential Revision: https://reviews.llvm.org/D141327
llvm/include/llvm/ADT/ArrayRef.h
llvm/unittests/ADT/ArrayRefTest.cpp