llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-driver Author: Sophia Herrmann (jellytabby) <details> <summary>Changes</summary> The `UsesLLVMOffloading` variable is not used when assertions are disabled, causing a warning. This fix surpresses that with `[[maybe_unused]]` --- Full diff: https://github.com/llvm/llvm-project/pull/216177.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Cuda.cpp (+1-1) ``````````diff diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp index 77d1f6bb556d5..6036b612b88c0 100644 --- a/clang/lib/Driver/ToolChains/Cuda.cpp +++ b/clang/lib/Driver/ToolChains/Cuda.cpp @@ -601,7 +601,7 @@ void NVPTX::Linker::ConstructJob(Compilation &C, const JobAction &JA, static_cast<const toolchains::NVPTXToolChain &>(getToolChain()); ArgStringList CmdArgs; - bool UsesLLVMOffloading = Args.hasFlag( + [[maybe_unused]] bool UsesLLVMOffloading = Args.hasFlag( options::OPT_foffload_via_llvm, options::OPT_fno_offload_via_llvm, false); assert((UsesLLVMOffloading || TC.getTriple().isNVPTX()) && "Wrong platform"); `````````` </details> https://github.com/llvm/llvm-project/pull/216177 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
