Skip to content

Commit f3eb5f9

Browse files
committed
[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
1 parent 9269752 commit f3eb5f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ extern "C" {
3535

3636
#pragma omp end declare variant
3737

38+
#ifdef __AMDGCN__
3839
#pragma omp begin declare variant match(device = {arch(amdgcn)})
3940

4041
// Import types which will be used by __clang_hip_libdevice_declares.h
@@ -54,6 +55,7 @@ extern "C" {
5455
#undef __OPENMP_AMDGCN__
5556

5657
#pragma omp end declare variant
58+
#endif
5759

5860
#ifdef __cplusplus
5961
} // extern "C"

0 commit comments

Comments
 (0)