From ba716c3972c0e341b89f38e1fefde6f2ab9bfde8 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 16 Aug 2018 03:33:50 +0100 Subject: [PATCH] Allow all targets supported by ROCm. Fix signed vs. unsigned comparison. --- lib/Driver/ToolChains/Hcc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Driver/ToolChains/Hcc.cpp b/lib/Driver/ToolChains/Hcc.cpp index 2021f45f8df..9c1059d7f6d 100755 --- a/lib/Driver/ToolChains/Hcc.cpp +++ b/lib/Driver/ToolChains/Hcc.cpp @@ -307,8 +307,10 @@ namespace bool is_valid(const std::string& gfxip) { - static constexpr std::array valid = { - { "gfx701", "gfx803", "gfx900", "gfx906" }}; + static constexpr std::array valid = { + { "gfx701", "gfx702", "gfx801", "gfx802", "gfx803", "gfx900", + "gfx902", "gfx906" } + }; return std::find(valid.cbegin(), valid.cend(), gfxip) != valid.cend(); } @@ -399,7 +401,7 @@ void HCC::CXXAMPLink::ConstructLinkerJob( AMDGPUTargetVector = split_gfx_list(HCC_AMDGPU_TARGET, ' '); } - const auto cnt = std::count( + const decltype(AMDGPUTargetVector.size()) cnt = std::count( AMDGPUTargetVector.cbegin(), AMDGPUTargetVector.cend(), auto_tgt); if (cnt > 1) C.getDriver().Diag(diag::warn_amdgpu_target_auto_nonsingular);