This revision was automatically updated to reflect the committed changes.
Closed by commit rL291130: [CUDA] Make CUDAInstallationDetector take the host
triple in its constructor. (authored by jlebar).
Changed prior to commit:
https://reviews.llvm.org/D28319?vs=83126&id=83254#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28319
Files:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
Index: cfe/trunk/lib/Driver/ToolChains.h
===================================================================
--- cfe/trunk/lib/Driver/ToolChains.h
+++ cfe/trunk/lib/Driver/ToolChains.h
@@ -43,7 +43,7 @@
mutable llvm::SmallSet<CudaArch, 4> ArchsWithVersionTooLowErrors;
public:
- CudaInstallationDetector(const Driver &D, const llvm::Triple &Triple,
+ CudaInstallationDetector(const Driver &D, const llvm::Triple &HostTriple,
const llvm::opt::ArgList &Args);
void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
Index: cfe/trunk/lib/Driver/ToolChains.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp
+++ cfe/trunk/lib/Driver/ToolChains.cpp
@@ -1805,7 +1805,7 @@
}
CudaInstallationDetector::CudaInstallationDetector(
- const Driver &D, const llvm::Triple &TargetTriple,
+ const Driver &D, const llvm::Triple &HostTriple,
const llvm::opt::ArgList &Args)
: D(D) {
SmallVector<std::string, 4> CudaPathCandidates;
@@ -1840,7 +1840,7 @@
// It's sufficient for our purposes to be flexible: If both lib and lib64
// exist, we choose whichever one matches our triple. Otherwise, if only
// lib exists, we use it.
- if (TargetTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64"))
+ if (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64"))
LibPath = InstallPath + "/lib64";
else if (FS.exists(InstallPath + "/lib"))
LibPath = InstallPath + "/lib";
@@ -4870,7 +4870,7 @@
CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple,
const ToolChain &HostTC, const ArgList &Args)
: ToolChain(D, Triple, Args), HostTC(HostTC),
- CudaInstallation(D, Triple, Args) {
+ CudaInstallation(D, HostTC.getTriple(), Args) {
if (CudaInstallation.isValid())
getProgramPaths().push_back(CudaInstallation.getBinPath());
}
Index: cfe/trunk/lib/Driver/ToolChains.h
===================================================================
--- cfe/trunk/lib/Driver/ToolChains.h
+++ cfe/trunk/lib/Driver/ToolChains.h
@@ -43,7 +43,7 @@
mutable llvm::SmallSet<CudaArch, 4> ArchsWithVersionTooLowErrors;
public:
- CudaInstallationDetector(const Driver &D, const llvm::Triple &Triple,
+ CudaInstallationDetector(const Driver &D, const llvm::Triple &HostTriple,
const llvm::opt::ArgList &Args);
void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
Index: cfe/trunk/lib/Driver/ToolChains.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp
+++ cfe/trunk/lib/Driver/ToolChains.cpp
@@ -1805,7 +1805,7 @@
}
CudaInstallationDetector::CudaInstallationDetector(
- const Driver &D, const llvm::Triple &TargetTriple,
+ const Driver &D, const llvm::Triple &HostTriple,
const llvm::opt::ArgList &Args)
: D(D) {
SmallVector<std::string, 4> CudaPathCandidates;
@@ -1840,7 +1840,7 @@
// It's sufficient for our purposes to be flexible: If both lib and lib64
// exist, we choose whichever one matches our triple. Otherwise, if only
// lib exists, we use it.
- if (TargetTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64"))
+ if (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64"))
LibPath = InstallPath + "/lib64";
else if (FS.exists(InstallPath + "/lib"))
LibPath = InstallPath + "/lib";
@@ -4870,7 +4870,7 @@
CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple,
const ToolChain &HostTC, const ArgList &Args)
: ToolChain(D, Triple, Args), HostTC(HostTC),
- CudaInstallation(D, Triple, Args) {
+ CudaInstallation(D, HostTC.getTriple(), Args) {
if (CudaInstallation.isValid())
getProgramPaths().push_back(CudaInstallation.getBinPath());
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits