Support/PathV2: Implement reverse iteration and parent_path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120496 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp
index 2c7c3cb..b8f818f 100644
--- a/unittests/Support/Path.cpp
+++ b/unittests/Support/Path.cpp
@@ -71,6 +71,15 @@
     }
     outs() << "]\n";
 
+    outs() << "    Reverse Iteration: [";
+    for (sys::path::reverse_iterator ci = sys::path::rbegin(*i),
+                                     ce = sys::path::rend(*i);
+                                     ci != ce;
+                                     ++ci) {
+      outs() << *ci << ',';
+    }
+    outs() << "]\n";
+
     StringRef res;
     SmallString<16> temp_store;
     if (error_code ec = sys::path::root_path(*i, res))
@@ -82,6 +91,9 @@
     if (error_code ec = sys::path::root_directory(*i, res))
       ASSERT_FALSE(ec.message().c_str());
     outs() << "    root_directory: " << res << '\n';
+    if (error_code ec = sys::path::parent_path(*i, res))
+      ASSERT_FALSE(ec.message().c_str());
+    outs() << "    parent_path: " << res << '\n';
 
     temp_store = *i;
     if (error_code ec = sys::path::make_absolute(temp_store))