[compiler-rt] [nsan] Use ALIGNED instead of alignas (NFC) (PR #98933)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 13:43:00 PDT 2024


MaskRay wrote:

> OK, I see. The issue is that `SANITIZER_INTERFACE_ATTRIBUTE alignas(16)` is not supported by older Clang. Other `alignas(...)` uses are fine. The problem only affects nsan.
> 
> `alignas(16) SANITIZER_INTERFACE_ATTRIBUTE` seems to work, so adjust the order instead?

`lib/msan/msan.cpp` has a similar use. `alignas(16) SANITIZER_INTERFACE_ATTRIBUTE`  works well there. Tested with Clang 7.   (Clang 6 libc++ can no longer build llvm-project. Clang 6 with GCC 14 cannot build llvm-project. )

Created #98958 and #98959 to clean up some `ALIGNED` in compiler-rt.

https://github.com/llvm/llvm-project/pull/98933


More information about the llvm-commits mailing list