1 Commits

Author SHA1 Message Date
eastb233
1906279580 [backport][Clang] Fix build with GCC 14 on ARM (#78704)
Reference: https://github.com/llvm/llvm-project/pull/78704
https://gitee.com/openeuler/llvm-project/pulls/90

GCC 14 defines `__arm_streaming` as a macro expanding to
`[[arm::streaming]]`. Due to the nested macro use, this gets expanded
prior to concatenation.

It doesn't look like C++ has a really clean way to prevent macro
expansion. The best I have found is to use `EMPTY ## X` where `EMPTY` is
an empty macro argument, so this is the hack I'm implementing here.

Fixes https://github.com/llvm/llvm-project/issues/78691.

(cherry picked from commit 4a7bc6b56844d331ddb0b76ab0b971072463bcd4)
2024-09-04 09:25:15 +08:00