[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

Kamil Rytarowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 21 09:11:49 PST 2018


krytarowski added inline comments.


================
Comment at: lib/xray/xray_defs.h:22
 
+#if !SANITIZER_NETBSD
+#define XRAY_TLS_ALIGNAS(x) alignas(x)
----------------
I would switch the order, in order to remove unneeded negation.

```
#if SANITIZER_NETBSD
...
#else
...
#endif
```

`#define XRAY_HAS_TLS_ALIGNAS 0` is not needed as `#if XRAY_HAS_TLS_ALIGNAS` will evaluate to false anyway and `#define XRAY_HAS_TLS_ALIGNAS 1` is equivalent to `#define XRAY_HAS_TLS_ALIGNAS`. But it's just a matter of style.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56000/new/

https://reviews.llvm.org/D56000





More information about the cfe-commits mailing list