diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-08-29 20:39:22 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-08-29 20:39:22 +0000 |
commit | 0e9a76dbe3b4beeb5d326070834f16826e0c74a1 (patch) | |
tree | 39557c6d1fcd4a3c37f3befa011befe49fa9aa4e /clang/test/Preprocessor/predefined-macros.c | |
parent | 77c57200f8f7a20eb71fc1a286fe5593d5a01f6e (diff) | |
download | bcm5719-llvm-0e9a76dbe3b4beeb5d326070834f16826e0c74a1.tar.gz bcm5719-llvm-0e9a76dbe3b4beeb5d326070834f16826e0c74a1.zip |
Add predefined macro __gnu_linux__ for proper aux-triple
Clang predefine macro __linx__ for aux-triple with Linux OS
but does not predefine macro __gnu_linux__. This causes
some compilation error for certain applications, e.g. Eigen.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D51441
llvm-svn: 340967
Diffstat (limited to 'clang/test/Preprocessor/predefined-macros.c')
-rw-r--r-- | clang/test/Preprocessor/predefined-macros.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/predefined-macros.c b/clang/test/Preprocessor/predefined-macros.c index 9296b1cf5a5..71c3166689e 100644 --- a/clang/test/Preprocessor/predefined-macros.c +++ b/clang/test/Preprocessor/predefined-macros.c @@ -183,9 +183,11 @@ // CHECK-HIP: #define __HIP__ 1 // RUN: %clang_cc1 %s -E -dM -o - -x hip -triple amdgcn-amd-amdhsa \ -// RUN: -fcuda-is-device \ +// RUN: -aux-triple x86_64-unknown-linux -fcuda-is-device \ // RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-HIP-DEV // CHECK-HIP-DEV-NOT: #define __CUDA_ARCH__ // CHECK-HIP-DEV: #define __HIPCC__ 1 // CHECK-HIP-DEV: #define __HIP_DEVICE_COMPILE__ 1 // CHECK-HIP-DEV: #define __HIP__ 1 +// CHECK_HIP-DEV: #define __linux__ 1 +// CHECK_HIP-DEV: #define __gnu_linux__ 1 |