Author: Pushpinder Singh Date: 2021-08-04T15:24:46Z New Revision: f3eb5f900d2ae6c8e1c03d1b250415a7b7aa39b1
URL: https://github.com/llvm/llvm-project/commit/f3eb5f900d2ae6c8e1c03d1b250415a7b7aa39b1 DIFF: https://github.com/llvm/llvm-project/commit/f3eb5f900d2ae6c8e1c03d1b250415a7b7aa39b1.diff LOG: [AMDGPU][OpenMP] Wrap amdgcn declare variant inside ifdef This fixes the issue https://bugs.llvm.org/show_bug.cgi?id=51337 Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D107468 Added: Modified: clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h Removed: ################################################################################ diff --git a/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h b/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h index 99cf2483e7343..279fb26fbaf78 100644 --- a/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h +++ b/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h @@ -35,6 +35,7 @@ extern "C" { #pragma omp end declare variant +#ifdef __AMDGCN__ #pragma omp begin declare variant match(device = {arch(amdgcn)}) // Import types which will be used by __clang_hip_libdevice_declares.h @@ -54,6 +55,7 @@ extern "C" { #undef __OPENMP_AMDGCN__ #pragma omp end declare variant +#endif #ifdef __cplusplus } // extern "C" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits