diff options
author | Ben Langmuir <blangmuir@apple.com> | 2015-03-10 00:04:29 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2015-03-10 00:04:29 +0000 |
commit | 2547f93e95c8f06a1589615b923be9445f41e581 (patch) | |
tree | 5d5d9ffe7da5a042bf991eebde8ccdfa9b168d9d /llvm/lib/Support/Path.cpp | |
parent | af92337ec9c45b3b258ad15490005766882b532c (diff) | |
download | llvm-2547f93e95c8f06a1589615b923be9445f41e581.zip llvm-2547f93e95c8f06a1589615b923be9445f41e581.tar.gz llvm-2547f93e95c8f06a1589615b923be9445f41e581.tar.bz2 |
Don't treat .foo as two path components in path::iterators
We were treating '/.foo' as ['/', '.', 'foo'] instead of ['/', '.foo'],
which lead to insanity. Same for '..'.
llvm-svn: 231727
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r-- | llvm/lib/Support/Path.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index 8ffbb18..6871b21c 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -49,7 +49,6 @@ namespace { // * empty (in this case we return an empty string) // * either C: or {//,\\}net. // * {/,\} - // * {.,..} // * {file,directory}name if (path.empty()) @@ -76,12 +75,6 @@ namespace { if (is_separator(path[0])) return path.substr(0, 1); - if (path.startswith("..")) - return path.substr(0, 2); - - if (path[0] == '.') - return path.substr(0, 1); - // * {file,directory}name size_t end = path.find_first_of(separators); return path.substr(0, end); |