[clang] af00eb2 - Fix __clang_cuda_math_forward_declares.h
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 20:47:58 PDT 2020
Author: Yaxun (Sam) Liu
Date: 2020-06-10T23:47:13-04:00
New Revision: af00eb25f890ecbf02818f1466da8f30d93e6298
URL: https://github.com/llvm/llvm-project/commit/af00eb25f890ecbf02818f1466da8f30d93e6298
DIFF: https://github.com/llvm/llvm-project/commit/af00eb25f890ecbf02818f1466da8f30d93e6298.diff
LOG: 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.
Added:
Modified:
clang/lib/Headers/__clang_cuda_math_forward_declares.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/__clang_cuda_math_forward_declares.h b/clang/lib/Headers/__clang_cuda_math_forward_declares.h
index 7c0b3575b25a..8a270859e4a5 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
More information about the cfe-commits
mailing list