[PATCH] D133429: [llvm] Use std::size instead of llvm::array_lengthof
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 08:57:54 PDT 2022
kazu added a comment.
In D133429#3777310 <https://reviews.llvm.org/D133429#3777310>, @jloser wrote:
> In D133429#3776384 <https://reviews.llvm.org/D133429#3776384>, @dblaikie wrote:
>
>> As a follow-up, probably good to deprecate the API with the necessary recommended alternative for at least a little while, to client code migrations easier.
>>
>> @kazu - this might be something you'd be interested in helping with, or pointing @jloser to the right tools/directions.
>
> Sounds good to me. I just opened https://reviews.llvm.org/D133502 to mark the function deprecated, but let me know if you or @kazu had something else in mind. I've fixed downstream callers in MLIR and LLDB (https://reviews.llvm.org/D133501) with Clang being on my list to do as well. This only accounts for the call sites in LLVM codebase though rather than external downstream. Is there a process (e.g. wait two weeks after deprecating before removal) or something of the like?
This is a great cleanup. Thank you!
I am not aware of any documented process. For my recent deprecation of `Optional::hasValue`, I am waiting for 3 months or so, but some call it too long. So, wait as long as reasonable in your terms.
In any event, I think it's a good idea to clean up internal downstream users first before deprecating `array_lengthof`. The llvm codebase and internal downstream build cleanly even with `-Werror` (with clang being the host compiler), so we don't want to introduce a lot of deprecation warnings all of a sudden.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133429/new/
https://reviews.llvm.org/D133429
More information about the llvm-commits
mailing list