diff --git a/clang/tools/amdgpu-arch/AMDGPUArch.cpp b/clang/tools/amdgpu-arch/AMDGPUArch.cpp --- a/clang/tools/amdgpu-arch/AMDGPUArch.cpp +++ b/clang/tools/amdgpu-arch/AMDGPUArch.cpp @@ -11,7 +11,16 @@ // //===----------------------------------------------------------------------===// -#include +#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 #include