aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileSystem.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-07 03:57:17 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-07 03:57:17 +0000
commitee271d8758c8493f2cadf5b9c0ec57431565891b (patch)
tree2075d5abc1a317ff6d0160c9b74f7bc7bbae7159 /include/llvm/Support/FileSystem.h
parentbf60dad984e296d43a8a6b33e8c528e8c8a24394 (diff)
Support/PathV2: Move make_absolute from path to fs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r--include/llvm/Support/FileSystem.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 5b8e2eab8e..121e77066e 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -104,6 +104,19 @@ public:
/// @name Physical Operators
/// @{
+/// @brief Make \a path an absolute path.
+///
+/// Makes \a path absolute using the current directory if it is not already. An
+/// empty \a path will result in the current directory.
+///
+/// /absolute/path => /absolute/path
+/// relative/../path => <current-directory>/relative/../path
+///
+/// @param path A path that is modified to be an absolute path.
+/// @returns errc::success if \a path has been made absolute, otherwise a
+/// platform specific error_code.
+error_code make_absolute(SmallVectorImpl<char> &path);
+
/// @brief Copy the file at \a from to the path \a to.
///
/// @param from The path to copy the file from.