[llvm-branch-commits] [cfe-branch] r143941 - in /cfe/branches/release_30: ./ lib/Driver/ToolChains.cpp
Chandler Carruth
chandlerc at gmail.com
Mon Nov 7 02:30:25 PST 2011
Author: chandlerc
Date: Mon Nov 7 04:30:25 2011
New Revision: 143941
URL: http://llvm.org/viewvc/llvm-project?rev=143941&view=rev
Log:
Merging r143839:
------------------------------------------------------------------------
r143839 | chandlerc | 2011-11-05 15:23:11 -0700 (Sat, 05 Nov 2011) | 2 lines
Remove a no-longer needed helper function. Thanks for implementing this
Michael!
------------------------------------------------------------------------
Modified:
cfe/branches/release_30/ (props changed)
cfe/branches/release_30/lib/Driver/ToolChains.cpp
Propchange: cfe/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 7 04:30:25 2011
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838
+/cfe/trunk:142113,142133-142134,142187,142349,142474,142476,142918,143344-143345,143684,143686-143687,143751-143752,143798,143801,143804-143807,143822-143823,143836,143838-143839
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_30/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/lib/Driver/ToolChains.cpp?rev=143941&r1=143940&r2=143941&view=diff
==============================================================================
--- cfe/branches/release_30/lib/Driver/ToolChains.cpp (original)
+++ cfe/branches/release_30/lib/Driver/ToolChains.cpp Mon Nov 7 04:30:25 2011
@@ -1521,14 +1521,6 @@
return UnknownDistro;
}
-/// \brief Trivial helper function to simplify code checking path existence.
-static bool PathExists(StringRef Path) {
- bool Exists;
- if (!llvm::sys::fs::exists(Path, Exists))
- return Exists;
- return false;
-}
-
/// \brief Struct to store and manipulate GCC versions.
///
/// We rely on assumptions about the form and structure of GCC version
@@ -1624,11 +1616,11 @@
// installation available. GCC installs are ranked by version number.
GCCVersion BestVersion = {0, 0, 0};
for (unsigned i = 0, ie = Prefixes.size(); i < ie; ++i) {
- if (!PathExists(Prefixes[i]))
+ if (!llvm::sys::fs::exists(Prefixes[i]))
continue;
for (unsigned j = 0, je = CandidateLibDirs.size(); j < je; ++j) {
const std::string LibDir = Prefixes[i] + CandidateLibDirs[j].str();
- if (!PathExists(LibDir))
+ if (!llvm::sys::fs::exists(LibDir))
continue;
for (unsigned k = 0, ke = CandidateTriples.size(); k < ke; ++k)
ScanLibDirForGCCTriple(LibDir, CandidateTriples[k], BestVersion);
@@ -1731,7 +1723,7 @@
continue;
if (CandidateVersion <= BestVersion)
continue;
- if (!PathExists(LI->path() + "/crtbegin.o"))
+ if (!llvm::sys::fs::exists(LI->path() + "/crtbegin.o"))
continue;
BestVersion = CandidateVersion;
@@ -1748,7 +1740,7 @@
static void addPathIfExists(const std::string &Path,
ToolChain::path_list &Paths) {
- if (PathExists(Path)) Paths.push_back(Path);
+ if (llvm::sys::fs::exists(Path)) Paths.push_back(Path);
}
/// \brief Get our best guess at the multiarch triple for a target.
More information about the llvm-branch-commits
mailing list