1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can check

limits on their own.

llvm-svn: 118113
This commit is contained in:
Dan Gohman 2010-11-02 23:19:55 +00:00
parent 76b970b846
commit 3a69090d70

View File

@ -96,10 +96,12 @@ Path::operator=(StringRef that) {
bool
Path::isValid() const {
// Check some obvious things
if (path.empty())
return false;
return path.length() < MAXPATHLEN;
// Empty paths are considered invalid here.
// This code doesn't check MAXPATHLEN because there's no need. Nothing in
// LLVM manipulates Paths with fixed-sizes arrays, and if the OS can't
// handle names longer than some limit, it'll report this on demand using
// ENAMETOLONG.
return !path.empty();
}
bool