[OpenMP][Test] Add check for aux-triple predefined macros
authorAlexey Bader <alexey.bader@intel.com>
Thu, 12 Dec 2019 09:52:28 +0000 (12:52 +0300)
committerAlexey Bader <alexey.bader@intel.com>
Thu, 12 Dec 2019 11:36:11 +0000 (14:36 +0300)
Summary:
Make sure that auxiliary target specific macros are defined in OpenMP
mode.

Reviewers: ABataev, jdoerfert

Subscribers: guansong, ebevhan, cfe-commits

Tags: #clang

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

clang/test/OpenMP/aux-triple-macros.cpp [new file with mode: 0644]

diff --git a/clang/test/OpenMP/aux-triple-macros.cpp b/clang/test/OpenMP/aux-triple-macros.cpp
new file mode 100644 (file)
index 0000000..73b74bd
--- /dev/null
@@ -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