mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -71,6 +71,15 @@ TEST(Support, Path) {
|
||||
}
|
||||
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 @@ TEST(Support, Path) {
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user