This revision was automatically updated to reflect the committed changes. Closed by commit rG4921b0a285ac: [clang][Driver][CUDA] Get rid of unused LibPath (authored by kadircet).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141467/new/ https://reviews.llvm.org/D141467 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/Cuda.h Index: clang/lib/Driver/ToolChains/Cuda.h =================================================================== --- clang/lib/Driver/ToolChains/Cuda.h +++ clang/lib/Driver/ToolChains/Cuda.h @@ -31,7 +31,6 @@ CudaVersion Version = CudaVersion::UNKNOWN; std::string InstallPath; std::string BinPath; - std::string LibPath; std::string LibDevicePath; std::string IncludePath; llvm::StringMap<std::string> LibDeviceMap; @@ -69,8 +68,6 @@ StringRef getBinPath() const { return BinPath; } /// Get the detected Cuda Include path. StringRef getIncludePath() const { return IncludePath; } - /// Get the detected Cuda library path. - StringRef getLibPath() const { return LibPath; } /// Get the detected Cuda device library path. StringRef getLibDevicePath() const { return LibDevicePath; } /// Get libdevice file for given architecture Index: clang/lib/Driver/ToolChains/Cuda.cpp =================================================================== --- clang/lib/Driver/ToolChains/Cuda.cpp +++ clang/lib/Driver/ToolChains/Cuda.cpp @@ -194,19 +194,6 @@ if (CheckLibDevice && !FS.exists(LibDevicePath)) continue; - // On Linux, we have both lib and lib64 directories, and we need to choose - // based on our triple. On MacOS, we have only a lib directory. - // - // 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 (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64")) - LibPath = InstallPath + "/lib64"; - else if (FS.exists(InstallPath + "/lib")) - LibPath = InstallPath + "/lib"; - else - continue; - Version = CudaVersion::UNKNOWN; if (auto CudaHFile = FS.getBufferForFile(InstallPath + "/include/cuda.h")) Version = parseCudaHFile((*CudaHFile)->getBuffer());
Index: clang/lib/Driver/ToolChains/Cuda.h =================================================================== --- clang/lib/Driver/ToolChains/Cuda.h +++ clang/lib/Driver/ToolChains/Cuda.h @@ -31,7 +31,6 @@ CudaVersion Version = CudaVersion::UNKNOWN; std::string InstallPath; std::string BinPath; - std::string LibPath; std::string LibDevicePath; std::string IncludePath; llvm::StringMap<std::string> LibDeviceMap; @@ -69,8 +68,6 @@ StringRef getBinPath() const { return BinPath; } /// Get the detected Cuda Include path. StringRef getIncludePath() const { return IncludePath; } - /// Get the detected Cuda library path. - StringRef getLibPath() const { return LibPath; } /// Get the detected Cuda device library path. StringRef getLibDevicePath() const { return LibDevicePath; } /// Get libdevice file for given architecture Index: clang/lib/Driver/ToolChains/Cuda.cpp =================================================================== --- clang/lib/Driver/ToolChains/Cuda.cpp +++ clang/lib/Driver/ToolChains/Cuda.cpp @@ -194,19 +194,6 @@ if (CheckLibDevice && !FS.exists(LibDevicePath)) continue; - // On Linux, we have both lib and lib64 directories, and we need to choose - // based on our triple. On MacOS, we have only a lib directory. - // - // 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 (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64")) - LibPath = InstallPath + "/lib64"; - else if (FS.exists(InstallPath + "/lib")) - LibPath = InstallPath + "/lib"; - else - continue; - Version = CudaVersion::UNKNOWN; if (auto CudaHFile = FS.getBufferForFile(InstallPath + "/include/cuda.h")) Version = parseCudaHFile((*CudaHFile)->getBuffer());
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits