[clang] clang: Remove BoundArch assert in AMDGPUToolChain::addClangTargetOptions (PR #203060)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 10:50:26 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-backend-amdgpu
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
This was assuming that the offload languages use a subclass, and
only OpenCL hits the AMDGPUToolChain base class. Flang violates this,
and passes in the wrong values. Delete the assert for now.
---
Full diff: https://github.com/llvm/llvm-project/pull/203060.diff
1 Files Affected:
- (modified) clang/lib/Driver/ToolChains/AMDGPU.cpp (-3)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 47df326fca9be..4320d1480be61 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -841,9 +841,6 @@ ROCMToolChain::ROCMToolChain(const Driver &D, const llvm::Triple &Triple,
void AMDGPUToolChain::addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
llvm::StringRef BoundArch, Action::OffloadKind DeviceOffloadingKind) const {
- assert(DeviceOffloadingKind == Action::OFK_None && BoundArch.empty() &&
- "this toolchain is for non-offloading cases");
-
// Default to "hidden" visibility, as object level linking will not be
// supported for the foreseeable future.
// TODO: remove the SPIR-V bypass once it can encode (hidden) visibility.
``````````
</details>
https://github.com/llvm/llvm-project/pull/203060
More information about the cfe-commits
mailing list