From 2547f93e95c8f06a1589615b923be9445f41e581 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 10 Mar 2015 00:04:29 +0000 Subject: 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 --- llvm/lib/Support/Path.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'llvm/lib/Support/Path.cpp') diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index 8ffbb185ac0..6871b21c953 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); -- cgit v1.2.3