[llvm-dev] Change LLVM_ATTRIBUTE_DEPRECATED macro to [[deprecated]]
Stephen Kelly via llvm-dev
llvm-dev at lists.llvm.org
Fri Jan 8 14:12:19 PST 2021
On 08/01/2021 11:05, Christian Sigg via llvm-dev wrote:
> The LLVM_ATTRIBUTE_DEPRECATED macro marks e.g. function declarations as
> deprecated.
>
> C++14 introduced the [[deprecated]] attribute, and I would like to
> switch LLVM's code to that because it's portable, easier to read, and
> can be applied to inline functions as well.
>
> https://reviews.llvm.org/D94219 is the first step towards that by
> changing the LLVM_ATTRIBUTE_DEPRECATED implementation from
> __attribute__/__declspec to [[deprecated]]. In a follow-up change, I
> will switch the call sites to use [[deprecated]] directly and finally
> remove the macro.
>
> Are there any downsides that I'm missing or any objections?
The only downside I'm aware of is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96117
I don't think the llvm build uses export macros, but are there any
places where different attribute types are used?
Thanks,
Stephen.
More information about the llvm-dev
mailing list