[libcxx-commits] [PATCH] D103705: [libc++] Simplify a few macros in __config
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 4 11:18:45 PDT 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/__config:545-547
+#if !defined(__SANITIZE_ADDRESS__)
#define _LIBCPP_HAS_NO_ASAN
#endif
----------------
I would strongly (but unfortunately with low authority-to-override-Louis) prefer to keep most or all of these `#if`s. These `#if`s seem to make it much easier to check the codegen with and without a certain feature, e.g. to compare
```
g++ -D_LIBCPP_HAS_NO_ASAN test.cpp -S
g++ -U_LIBCPP_HAS_NO_ASAN test.cpp -S
g++ -D_LIBCPP_NODEBUG_TYPE= test.cpp -S
g++ -D_LIBCPP_NODEBUG_TYPE='[[clang::nodebug]]' test.cpp -S
```
on Godbolt or something, instead of having to manually edit and rebuild the libc++ headers locally.
(I've used this same pattern for my p1144 `_LIBCPP_TRIVIALLY_RELOCATABLE` macro, so that you can use Godbolt to compare the codegen with `-D_LIBCPP_TRIVIALLY_RELOCATABLE=[[trivially_relocatable]]` against the codegen with `-D_LIBCPP_TRIVIALLY_RELOCATABLE=`.)
https://p1144.godbolt.org/z/h4Torssz4
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103705/new/
https://reviews.llvm.org/D103705
More information about the libcxx-commits
mailing list