[clang] clang/AMDGPU: Remove dead code in RocmInstallationDetector (PR #180920)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 03:27:53 PST 2026
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/180920
The defaulted constructor argument isn't used anywhere, so
this path is unreachable.
>From cd719f4d8411c66b3d586e8163a002270ddc3713 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 11 Feb 2026 12:26:39 +0100
Subject: [PATCH] clang/AMDGPU: Remove dead code in RocmInstallationDetector
The defaulted constructor argument isn't used anywhere, so
this path is unreachable.
---
clang/include/clang/Driver/RocmInstallationDetector.h | 3 +--
clang/lib/Driver/ToolChains/AMDGPU.cpp | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
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() {
More information about the cfe-commits
mailing list