summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-08 22:50:09 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-08 22:50:09 +0000
commit0a7625d6618d21b065747cd53989c3565d460300 (patch)
treea3530c8167db32a3a2dbf96c283d4171f937d83f /llvm/lib/Support/Unix
parent394256cc0d683f51063d31517cbe48572e85103e (diff)
downloadbcm5719-llvm-0a7625d6618d21b065747cd53989c3565d460300.tar.gz
bcm5719-llvm-0a7625d6618d21b065747cd53989c3565d460300.zip
Support/FileSystem: Implement recursive_directory_iterator and make
directory_iterator preserve InputIterator semantics on copy. llvm-svn: 146200
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/PathV2.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc
index bbbc344661b..7477b4f2a08 100644
--- a/llvm/lib/Support/Unix/PathV2.inc
+++ b/llvm/lib/Support/Unix/PathV2.inc
@@ -439,7 +439,8 @@ rety_open_create:
return success;
}
-error_code directory_iterator_construct(directory_iterator &it, StringRef path){
+error_code detail::directory_iterator_construct(detail::DirIterState &it,
+ StringRef path){
SmallString<128> path_null(path);
DIR *directory = ::opendir(path_null.c_str());
if (directory == 0)
@@ -452,7 +453,7 @@ error_code directory_iterator_construct(directory_iterator &it, StringRef path){
return directory_iterator_increment(it);
}
-error_code directory_iterator_destruct(directory_iterator& it) {
+error_code detail::directory_iterator_destruct(detail::DirIterState &it) {
if (it.IterationHandle)
::closedir(reinterpret_cast<DIR *>(it.IterationHandle));
it.IterationHandle = 0;
@@ -460,7 +461,7 @@ error_code directory_iterator_destruct(directory_iterator& it) {
return success;
}
-error_code directory_iterator_increment(directory_iterator& it) {
+error_code detail::directory_iterator_increment(detail::DirIterState &it) {
errno = 0;
dirent *cur_dir = ::readdir(reinterpret_cast<DIR *>(it.IterationHandle));
if (cur_dir == 0 && errno != 0) {
OpenPOWER on IntegriCloud