summaryrefslogtreecommitdiff
path: root/lib/Support/PathV2.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-06 04:28:42 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-06 04:28:42 +0000
commit753cbbbd3ce28253f381caff83ce2a7f6e08785b (patch)
tree2cd99ba29bce96f8f3db9d4e4ef781c959c68679 /lib/Support/PathV2.cpp
parentf150e7695e32d42856d86499fcde970825371637 (diff)
downloadllvm-753cbbbd3ce28253f381caff83ce2a7f6e08785b.tar.gz
llvm-753cbbbd3ce28253f381caff83ce2a7f6e08785b.tar.bz2
llvm-753cbbbd3ce28253f381caff83ce2a7f6e08785b.tar.xz
Support/FileSystem: Add directory_iterator implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PathV2.cpp')
-rw-r--r--lib/Support/PathV2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp
index 73896edecc..639b323a82 100644
--- a/lib/Support/PathV2.cpp
+++ b/lib/Support/PathV2.cpp
@@ -688,6 +688,16 @@ error_code create_directories(const Twine &path, bool &existed) {
return create_directory(p, existed);
}
+void directory_entry::replace_filename(const Twine &filename, file_status st,
+ file_status symlink_st) {
+ SmallString<128> path(Path.begin(), Path.end());
+ path::remove_filename(path);
+ path::append(path, filename);
+ Path = path.str();
+ Status = st;
+ SymlinkStatus = symlink_st;
+}
+
} // end namespace fs
} // end namespace sys
} // end namespace llvm