[libcxx-commits] [PATCH] D85924: [clang] Add __RELATIVE_CXX_ABI_VTABLES predefine macro
Roland McGrath via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 13 14:03:43 PDT 2020
mcgrathr added inline comments.
================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1127
+ if (LangOpts.RelativeCXXABIVTables)
+ Builder.defineMacro("__RELATIVE_CXX_ABI_VTABLES");
----------------
ldionne wrote:
> mcgrathr wrote:
> > This should also test `LangOpts.CplusPlus` so it's never defined in C compilation.
> >
> > I don't know what precedents there are to follow for how to choose the exact name here.
> > Having something like `__CXX_ABI_` be a prefix for all such things seems wise.
> >
> Should we be using some `__has_feature(...)` instead?
That does seem like a very good fit here, and really easy to use with just one line in Features.def AFAICT.
Maybe `__has_feature(cxx_abi_relative_vtable)` and in future add more `cxx_abi_foo` ones?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85924/new/
https://reviews.llvm.org/D85924
More information about the libcxx-commits
mailing list