[clang] 39a83eb - amdgpu-arch: Prefer hsa/hsa.h over hsa.h

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 17:55:22 PST 2023


Author: Matt Arsenault
Date: 2023-01-04T20:51:51-05:00
New Revision: 39a83ebd47fb56da5c1bd9dd976b70d551656cab

URL: https://github.com/llvm/llvm-project/commit/39a83ebd47fb56da5c1bd9dd976b70d551656cab
DIFF: https://github.com/llvm/llvm-project/commit/39a83ebd47fb56da5c1bd9dd976b70d551656cab.diff

LOG: amdgpu-arch: Prefer hsa/hsa.h over hsa.h

The header now prints a warning if you include hsa.h telling you to
include hsa/hsa.h

Added: 
    

Modified: 
    clang/tools/amdgpu-arch/AMDGPUArch.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/amdgpu-arch/AMDGPUArch.cpp b/clang/tools/amdgpu-arch/AMDGPUArch.cpp
index 4fae78b4f121c..8398f6e81a229 100644
--- a/clang/tools/amdgpu-arch/AMDGPUArch.cpp
+++ b/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


        


More information about the cfe-commits mailing list