[clang] 6af11db - clang/AMDGPU: Remove dead code in RocmInstallationDetector (#180920)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 05:29:31 PST 2026
Author: Matt Arsenault
Date: 2026-02-11T14:29:26+01:00
New Revision: 6af11dba3cb158d46e598363ae1035f7935aa700
URL: https://github.com/llvm/llvm-project/commit/6af11dba3cb158d46e598363ae1035f7935aa700
DIFF: https://github.com/llvm/llvm-project/commit/6af11dba3cb158d46e598363ae1035f7935aa700.diff
LOG: clang/AMDGPU: Remove dead code in RocmInstallationDetector (#180920)
The defaulted constructor argument isn't used anywhere, so
this path is unreachable.
Added:
Modified:
clang/include/clang/Driver/RocmInstallationDetector.h
clang/lib/Driver/ToolChains/AMDGPU.cpp
Removed:
################################################################################
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