[all-commits] [llvm/llvm-project] 9a4650: [CUDA] Unbreak CUDA compilation with -std=c++20

Artem Belevich via All-commits all-commits at lists.llvm.org
Thu Nov 19 10:36:38 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a465057a64dba8a8614424d26136f5c0452bcc3
      https://github.com/llvm/llvm-project/commit/9a465057a64dba8a8614424d26136f5c0452bcc3
  Author: Artem Belevich <tra at google.com>
  Date:   2020-11-19 (Thu, 19 Nov 2020)

  Changed paths:
    M clang/lib/Headers/cuda_wrappers/new

  Log Message:
  -----------
  [CUDA] Unbreak CUDA compilation with -std=c++20

Standard libc++ headers in stdc++ mode include <new> which picks up
cuda_wrappers/new before any of the CUDA macros have been defined.

We can not include CUDA headers that early, so the work-around is to define
__device__ in the wrapper header itself.

Differential Revision: https://reviews.llvm.org/D91807




More information about the All-commits mailing list