[clang] clang/AMDGPU: Remove dead code in RocmInstallationDetector (PR #180920)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 03:28:36 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
The defaulted constructor argument isn't used anywhere, so
this path is unreachable.
---
Full diff: https://github.com/llvm/llvm-project/pull/180920.diff
2 Files Affected:
- (modified) clang/include/clang/Driver/RocmInstallationDetector.h (+1-2)
- (modified) clang/lib/Driver/ToolChains/AMDGPU.cpp (+1-3)
``````````diff
diff --git a/clang/include/clang/Driver/RocmInstallationDetector.h b/clang/include/clang/Driver/RocmInstallationDetector.h
index 046143aa8a250..488d9e7d40587 100644
--- a/clang/include/clang/Driver/RocmInstallationDetector.h
+++ b/clang/include/clang/Driver/RocmInstallationDetector.h
@@ -177,8 +177,7 @@ class RocmInstallationDetector {
public:
RocmInstallationDetector(const Driver &D, const llvm::Triple &HostTriple,
const llvm::opt::ArgList &Args,
- bool DetectHIPRuntime = true,
- bool DetectDeviceLib = false);
+ bool DetectHIPRuntime = true);
/// Get file paths of default bitcode libraries common to AMDGPU based
/// toolchains.
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 88307161df04c..3a1366d46315f 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -323,7 +323,7 @@ RocmInstallationDetector::getInstallationPathCandidates() {
RocmInstallationDetector::RocmInstallationDetector(
const Driver &D, const llvm::Triple &HostTriple,
- const llvm::opt::ArgList &Args, bool DetectHIPRuntime, bool DetectDeviceLib)
+ const llvm::opt::ArgList &Args, bool DetectHIPRuntime)
: D(D) {
Verbose = Args.hasArg(options::OPT_v);
RocmPathArg = Args.getLastArgValue(options::OPT_rocm_path_EQ);
@@ -377,8 +377,6 @@ RocmInstallationDetector::RocmInstallationDetector(
if (DetectHIPRuntime)
detectHIPRuntime();
- if (DetectDeviceLib)
- detectDeviceLibrary();
}
void RocmInstallationDetector::detectDeviceLibrary() {
``````````
</details>
https://github.com/llvm/llvm-project/pull/180920
More information about the cfe-commits
mailing list