aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-10 17:39:21 +0000
committerZachary Turner <zturner@google.com>2017-03-10 17:39:21 +0000
commite48ace6a65514a4f71669c50fd5d4ead67acdc7f (patch)
treef16ef818e20451ed8031e0fe16248b273043dfd8 /clang/unittests/Basic/VirtualFileSystemTest.cpp
parent62e0759d56b34c0b044a180e1bc89c419531cf57 (diff)
downloadllvm-e48ace6a65514a4f71669c50fd5d4ead67acdc7f.zip
llvm-e48ace6a65514a4f71669c50fd5d4ead67acdc7f.tar.gz
llvm-e48ace6a65514a4f71669c50fd5d4ead67acdc7f.tar.bz2
Add llvm::sys::fs::real_path.
LLVM already has real_path like functionality, but it is cumbersome to use and involves clean up after (e.g. you have to call openFileForRead, then close the resulting FD). Furthermore, on Windows it doesn't work for directories since opening a directory and opening a file require slightly different flags. So I add a simple function `real_path` which works for all paths on all platforms and has a simple to use interface. In doing so, I add the ability to opt in to resolving tilde expressions (e.g. ~/foo), which are normally handled by the shell. Differential Revision: https://reviews.llvm.org/D30668 llvm-svn: 297483
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions