pdhaliwal created this revision.
pdhaliwal added reviewers: jdoerfert, JonChesterfield, ronlieb, davezarzycki.
Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, yaxunl, nhaehnle,
jvesely, kzhuravl.
pdhaliwal requested review of this revision.
Herald added subscribers: cfe-commits, wdng.
Herald added a project: clang.
This patch is suppose to fix the issue of hsa.h not found.
Issue was reported in D99949 <https://reviews.llvm.org/D99949>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102067
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
@@ -11,7 +11,16 @@
//
//===----------------------------------------------------------------------===//
-#include <hsa.h>
+#if defined(__has_include)
+#if __has_include("hsa.h")
+#include "hsa.h"
+#elif __has_include("hsa/hsa.h")
+#include "hsa/hsa.h"
+#endif
+#else
+#include "hsa.h"
+#endif
+
#include <string>
#include <vector>
Index: clang/tools/amdgpu-arch/AMDGPUArch.cpp
===================================================================
--- clang/tools/amdgpu-arch/AMDGPUArch.cpp
+++ clang/tools/amdgpu-arch/AMDGPUArch.cpp
@@ -11,7 +11,16 @@
//
//===----------------------------------------------------------------------===//
-#include <hsa.h>
+#if defined(__has_include)
+#if __has_include("hsa.h")
+#include "hsa.h"
+#elif __has_include("hsa/hsa.h")
+#include "hsa/hsa.h"
+#endif
+#else
+#include "hsa.h"
+#endif
+
#include <string>
#include <vector>
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits