aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileSystem.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-07 01:22:31 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-07 01:22:31 +0000
commit1522fce477f3b6b1b5812aa561ad2ff3f51eb968 (patch)
tree7091ae78128def7a19269ea17f9f9632ab220d45 /include/llvm/Support/FileSystem.h
parent3890e397c3fa6cc11f50ea5e32ca81afa1e653a5 (diff)
Support/PathV2: Move current_path from path to fs and fix the Unix implementation.
Unix bug spotted by Dan Gohman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r--include/llvm/Support/FileSystem.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index ce4da7ea75..5b8e2eab8e 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -148,6 +148,13 @@ error_code create_hard_link(const Twine &to, const Twine &from);
/// otherwise a platform specific error_code.
error_code create_symlink(const Twine &to, const Twine &from);
+/// @brief Get the current path.
+///
+/// @param result Holds the current path on return.
+/// @results errc::success if the current path has been stored in result,
+/// otherwise a platform specific error_code.
+error_code current_path(SmallVectorImpl<char> &result);
+
/// @brief Remove path. Equivalent to POSIX remove().
///
/// @param path Input path.