[PATCH] D149364: [CUDA] Temporarily undefine __noinline__ when including bits/shared_ptr_base.h

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 27 15:16:35 PDT 2023


tra added a comment.

Fun tidbit: https://github.com/NVIDIA/thrust/issues/1703#issuecomment-1526604000

> Indeed, I believe the nvcc frontend has special handling for that attribute expansion. clang would need to emulate that "special" handling
>
> Right. The __attribute__((__attribute__((noinline)))) void foo(); gets magically transformed into __attribute((noinline)) void foo() by the time it makes it to the final host compilation. 😭
>
> And the magic seems to work only for __attribute__((__attribute__((noinline)))). Any other variants I tried error out.
>
> So, it's been a known issue in the CUDA headers, deliberately worked around in NVCC. And now the bug lives on and keeps giving...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149364



More information about the cfe-commits mailing list