bader created this revision. bader added a reviewer: ABataev. Herald added subscribers: cfe-commits, ebevhan, guansong. Herald added a reviewer: jdoerfert. Herald added a project: clang.
Make sure that auxiliary target specific macros are defined in OpenMP mode. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D71413 Files: clang/test/OpenMP/aux-triple-macros.cpp Index: clang/test/OpenMP/aux-triple-macros.cpp =================================================================== --- /dev/null +++ clang/test/OpenMP/aux-triple-macros.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 %s -triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck %s +// RUN: %clang_cc1 %s -fopenmp -fopenmp-is-device -triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck --check-prefix=CHECK-OMP-DEVICE %s + +// CHECK-NOT:#define __x86_64__ 1 +// CHECK-OMP-DEVICE:#define __x86_64__ 1
Index: clang/test/OpenMP/aux-triple-macros.cpp =================================================================== --- /dev/null +++ clang/test/OpenMP/aux-triple-macros.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 %s -triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck %s +// RUN: %clang_cc1 %s -fopenmp -fopenmp-is-device -triple nvptx64 -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck --check-prefix=CHECK-OMP-DEVICE %s + +// CHECK-NOT:#define __x86_64__ 1 +// CHECK-OMP-DEVICE:#define __x86_64__ 1
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits