This is an archive of the discontinued LLVM Phabricator instance.

[llvm][ADT] Replace uses of `makeMutableArrayRef` with deduction guides
ClosedPublic

Authored by jloser on Jan 15 2023, 8:50 PM.

Details

Summary

Similar to how makeArrayRef is deprecated in favor of deduction guides, do the
same for makeMutableArrayRef.

Once all of the places in-tree are using the deduction guides for
MutableArrayRef, we can mark makeMutableArrayRef as deprecated.

Diff Detail

Event Timeline

jloser created this revision.Jan 15 2023, 8:50 PM
Herald added a reviewer: rafauler. · View Herald Transcript
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
jloser requested review of this revision.Jan 15 2023, 8:50 PM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added projects: Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project. · View Herald Transcript

LGTM

lldb/source/Host/common/NativeProcessProtocol.cpp
651–652

random nit: This could be rewritten as

llvm::MutableArrayRef data(static_cast<uint8_t *>(buf), bytes_read);

now

This revision is now accepted and ready to land.Jan 15 2023, 11:55 PM
This revision was landed with ongoing or failed builds.Jan 16 2023, 1:51 PM
This revision was automatically updated to reflect the committed changes.
jloser added inline comments.Jan 16 2023, 1:51 PM
lldb/source/Host/common/NativeProcessProtocol.cpp
651–652

Yep, I just changed that before landing this. Thanks for the review!