[Driver] Don't implicitly copy std::strings in for-range loop.

Found by -Wrange-loop-analysis.

llvm-svn: 248495
This commit is contained in:
Benjamin Kramer 2015-09-24 14:48:37 +00:00
parent 3a91ada1e2
commit e8b764144e
1 changed files with 1 additions and 1 deletions

View File

@ -1497,7 +1497,7 @@ Generic_GCC::CudaInstallationDetector::init(const Driver &D,
CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.0");
}
for (const auto CudaPath : CudaPathCandidates) {
for (const auto &CudaPath : CudaPathCandidates) {
if (CudaPath.empty() || !llvm::sys::fs::exists(CudaPath))
continue;