[PATCH] D141013: amdgpu-arch: Prefer hsa/hsa.h over hsa.h
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 4 13:40:18 PST 2023
arsenm created this revision.
arsenm added reviewers: yaxunl, JonChesterfield.
Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
The header now prints a warning if you include hsa.h telling you to
include hsa/hsa.h
https://reviews.llvm.org/D141013
Files:
clang/tools/amdgpu-arch/AMDGPUArch.cpp
Index: clang/tools/amdgpu-arch/AMDGPUArch.cpp
===================================================================
--- clang/tools/amdgpu-arch/AMDGPUArch.cpp
+++ clang/tools/amdgpu-arch/AMDGPUArch.cpp
@@ -12,12 +12,12 @@
//===----------------------------------------------------------------------===//
#if defined(__has_include)
-#if __has_include("hsa.h")
-#define HSA_HEADER_FOUND 1
-#include "hsa.h"
-#elif __has_include("hsa/hsa.h")
+#if __has_include("hsa/hsa.h")
#define HSA_HEADER_FOUND 1
#include "hsa/hsa.h"
+#elif __has_include("hsa.h")
+#define HSA_HEADER_FOUND 1
+#include "hsa.h"
#else
#define HSA_HEADER_FOUND 0
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141013.486381.patch
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230104/d940ca98/attachment.bin>
More information about the cfe-commits
mailing list