Don't treat .foo as two path components in path::iterators
[oota-llvm.git] / lib / Support / Path.cpp
index 8ffbb185ac03b383df93d960f867297ea3a1bc10..6871b21c953e0a8e31dba32e304a34b63cb2317f 100644 (file)
@@ -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);