diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:42 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:42 +0000 |
commit | 7ecd94cc0bded43bef6833980b901579ab3b440d (patch) | |
tree | 6d944ab09038754cac573e1773a1d73648345ab5 /llvm/lib/Support/PathV2.cpp | |
parent | 95e4ac16a5bd7d442b45bc6bc0fd2a994bb5c7a9 (diff) | |
download | bcm5719-llvm-7ecd94cc0bded43bef6833980b901579ab3b440d.tar.gz bcm5719-llvm-7ecd94cc0bded43bef6833980b901579ab3b440d.zip |
Support/FileSystem: Add directory_iterator implementation.
llvm-svn: 120989
Diffstat (limited to 'llvm/lib/Support/PathV2.cpp')
-rw-r--r-- | llvm/lib/Support/PathV2.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Support/PathV2.cpp b/llvm/lib/Support/PathV2.cpp index 73896edecce..639b323a822 100644 --- a/llvm/lib/Support/PathV2.cpp +++ b/llvm/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 |