summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-10-05 13:02:43 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-10-05 13:02:43 +0000
commitae1d59967dc2c8bc09b3b60afc13754b45ec0ede (patch)
tree8014b4226f2bacabcb5b988ab2f2006951a73b64 /llvm/unittests/Support/Path.cpp
parenteda554a9b426f456366b41d53e1d85d879da1026 (diff)
downloadbcm5719-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.cpp4
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) {
OpenPOWER on IntegriCloud