r333514 - Fix -Wunused in NDEBUG introduced by HIP r333484

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Wed May 30 01:03:44 PDT 2018


Author: sammccall
Date: Wed May 30 01:03:43 2018
New Revision: 333514

URL: http://llvm.org/viewvc/llvm-project?rev=333514&view=rev
Log:
Fix -Wunused in NDEBUG introduced by HIP r333484

Modified:
    cfe/trunk/lib/Driver/ToolChains/HIP.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/HIP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/HIP.cpp?rev=333514&r1=333513&r2=333514&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/HIP.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/HIP.cpp Wed May 30 01:03:43 2018
@@ -186,9 +186,7 @@ void AMDGCN::Linker::ConstructJob(Compil
                                    const ArgList &Args,
                                    const char *LinkingOutput) const {
 
-  const auto &TC =
-      static_cast<const toolchains::HIPToolChain &>(getToolChain());
-  assert(TC.getTriple().getArch() == llvm::Triple::amdgcn &&
+  assert(getToolChain().getTriple().getArch() == llvm::Triple::amdgcn &&
          "Unsupported target");
 
   std::string SubArchName = JA.getOffloadingArch();
@@ -224,6 +222,7 @@ void HIPToolChain::addClangTargetOptions
 
   StringRef GpuArch = DriverArgs.getLastArgValue(options::OPT_march_EQ);
   assert(!GpuArch.empty() && "Must have an explicit GPU arch.");
+  (void) GpuArch;
   assert(DeviceOffloadingKind == Action::OFK_HIP &&
          "Only HIP offloading kinds are supported for GPUs.");
 




More information about the cfe-commits mailing list