[all-commits] [llvm/llvm-project] d55f05: [CUDA][HIP] Add pre-defined macro `__CLANG_RDC__`

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Tue Dec 7 15:10:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d55f05d9f7dc8aa0468a9db19d84671acf05823a
      https://github.com/llvm/llvm-project/commit/d55f05d9f7dc8aa0468a9db19d84671acf05823a
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2021-12-07 (Tue, 07 Dec 2021)

  Changed paths:
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/test/Preprocessor/predefined-macros.c

  Log Message:
  -----------
  [CUDA][HIP] Add pre-defined macro `__CLANG_RDC__`

nvcc defines __CUDACC_RDC__ for both host and
device compilation when -rdc=true is specified
(https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-identification-macro)

This patch defines __CLANG_RDC__ when -fgpu-rdc
is specified for CUDA/HIP.

Reviewed by: Artem Belevich

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




More information about the All-commits mailing list