summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
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
commit32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e (patch)
tree20850c7aae0532cfbbb2f0cd69e7347bc2673002 /llvm/lib/Support/Unix
parent513f1b666f3b36bdcb5c3eed5061a19678f53e53 (diff)
downloadbcm5719-llvm-32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e.tar.gz
bcm5719-llvm-32ef4d2e1bff1a23d42a7dfa0a5d248344b6c47e.zip
Support/FileSystem: Implement canonicalize.
llvm-svn: 146363
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/PathV2.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc
index 7477b4f2a08..41ed49fec7d 100644
--- a/llvm/lib/Support/Unix/PathV2.inc
+++ b/llvm/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);
OpenPOWER on IntegriCloud