[PATCH] D108592: [clang][Fuchsia] Support __attribute__((availability)) on Fuchsia
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 7 08:40:29 PDT 2021
aaron.ballman added inline comments.
================
Comment at: clang/lib/Basic/Targets/OSTargets.h:893
Builder.defineMacro("_GNU_SOURCE");
+ Builder.defineMacro("FUCHSIA_API_LEVEL", Twine(Opts.FuchsiaAPILevel));
+ this->PlatformName = "fuchsia";
----------------
haowei wrote:
> phosek wrote:
> > aaron.ballman wrote:
> > > I think this macro should be using a reserved name, as suggested by @phosek.
> > @aaron.ballman Do you have any thoughts on the letter case? I think that `__Fuchsia_API_level__` might be a better match for `__Fuchsia__`. Upper case is perhaps more usual, but other platforms like *BSD also use mixed case.
> I changed it to "__Fuchsia_API_level__" for now.
I don't have strong opinions so long as the identifier is reserved (and it is). I would note that the current capitalization might be a bit annoying for users to remember because it's `Fuchsia`, `API`, and `level`, all with different casing styles.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108592/new/
https://reviews.llvm.org/D108592
More information about the cfe-commits
mailing list