diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-05 13:02:43 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-05 13:02:43 +0000 |
commit | ae1d59967dc2c8bc09b3b60afc13754b45ec0ede (patch) | |
tree | 8014b4226f2bacabcb5b988ab2f2006951a73b64 /llvm/unittests/Support/Path.cpp | |
parent | eda554a9b426f456366b41d53e1d85d879da1026 (diff) | |
download | bcm5719-llvm-ae1d59967dc2c8bc09b3b60afc13754b45ec0ede.tar.gz bcm5719-llvm-ae1d59967dc2c8bc09b3b60afc13754b45ec0ede.zip |
[Support] Add a version of fs::make_absolute with a custom CWD.
This will be used soon from clang.
llvm-svn: 249309
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r-- | llvm/unittests/Support/Path.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index a4d2ab1bfc8..f35682e19b7 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -150,6 +150,10 @@ TEST(Support, Path) { path::native(*i, temp_store); } + + SmallString<32> Relative("foo.cpp"); + ASSERT_NO_ERROR(sys::fs::make_absolute("/root", Relative)); + ASSERT_EQ("/root/foo.cpp", Relative); } TEST(Support, RelativePathIterator) { |