aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Unix/PathV2.inc
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-12 06:04:01 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-12 06:04:01 +0000
commitc3b00e80400d27d5d6152374d87c0ad5866c780c (patch)
tree3adf92cdfd9478aae132d0d0d2ab5f25b57a79ed /lib/Support/Unix/PathV2.inc
parent1dd2ee7bf4d848e368829cb01033f297afb674ab (diff)
Support/FileSystem: Implement canonicalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix/PathV2.inc')
-rw-r--r--lib/Support/Unix/PathV2.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Support/Unix/PathV2.inc b/lib/Support/Unix/PathV2.inc
index 7477b4f2a0..41ed49fec7 100644
--- a/lib/Support/Unix/PathV2.inc
+++ b/lib/Support/Unix/PathV2.inc
@@ -439,6 +439,13 @@ rety_open_create:
return success;
}
+error_code canonicalize(const Twine &path, SmallVectorImpl<char> &result) {
+ // Paths are already canonicalized on posix systems.
+ assert(path::is_absolute(path) && "path must be absolute!");
+ path.toVector(result);
+ return success;
+}
+
error_code detail::directory_iterator_construct(detail::DirIterState &it,
StringRef path){
SmallString<128> path_null(path);