mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can check
limits on their own. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118113 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d51257a436
commit
ac793822cd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user