From af00eb25f890ecbf02818f1466da8f30d93e6298 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 10 Jun 2020 23:41:51 -0400 Subject: [PATCH] Fix __clang_cuda_math_forward_declares.h Recent change from `#if !defined(__CUDA__)` to `#if !__CUDA__` caused regression on ROCm 3.5 since there is `#define __CUDA__` before inclusion of the header file, which causes `#if !__CUDA__` to be invalid. Change `#if !__CUDA__` back to `#if !defined(__CUDA__)` for backward compatibility. --- clang/lib/Headers/__clang_cuda_math_forward_declares.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Headers/__clang_cuda_math_forward_declares.h b/clang/lib/Headers/__clang_cuda_math_forward_declares.h index 7c0b357..8a27085 100644 --- a/clang/lib/Headers/__clang_cuda_math_forward_declares.h +++ b/clang/lib/Headers/__clang_cuda_math_forward_declares.h @@ -8,7 +8,7 @@ */ #ifndef __CLANG__CUDA_MATH_FORWARD_DECLARES_H__ #define __CLANG__CUDA_MATH_FORWARD_DECLARES_H__ -#if !__CUDA__ && !__HIP__ +#if !defined(__CUDA__) && !__HIP__ #error "This file is for CUDA/HIP compilation only." #endif -- 2.7.4