diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-11 18:40:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-11 18:40:24 +0000 |
commit | 83f858e578d3efa07549c1757d675293bc844b9a (patch) | |
tree | e1cfec2ace6af51b8973a1b30d50896d7c470d12 /llvm/unittests/Support/Path.cpp | |
parent | 698a5bdbba4c01c39a03b23280cd95ecbf153164 (diff) | |
download | llvm-83f858e578d3efa07549c1757d675293bc844b9a.zip llvm-83f858e578d3efa07549c1757d675293bc844b9a.tar.gz llvm-83f858e578d3efa07549c1757d675293bc844b9a.tar.bz2 |
Cleanup the interface for creating soft or hard links.
Before this patch the unix code for creating hardlinks was unused. The code
for creating symbolic links was implemented in lib/Support/LockFileManager.cpp
and the code for creating hard links in lib/Support/*/Path.inc.
The only use we have for these is in LockFileManager.cpp and it can use both
soft and hard links. Just have a create_link function that creates one or the
other depending on the platform.
llvm-svn: 203596
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r-- | llvm/unittests/Support/Path.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index d5bee7a..91e421d 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -299,7 +299,7 @@ TEST_F(FileSystemTest, Unique) { // Two paths representing the same file on disk should still provide the // same unique id. We can test this by making a hard link. - ASSERT_NO_ERROR(fs::create_hard_link(Twine(TempPath), Twine(TempPath2))); + ASSERT_NO_ERROR(fs::create_link(Twine(TempPath), Twine(TempPath2))); fs::UniqueID D2; ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D2)); ASSERT_EQ(D2, F1); @@ -365,7 +365,7 @@ TEST_F(FileSystemTest, TempFiles) { ASSERT_FALSE(TempPath3.endswith(".")); // Create a hard link to Temp1. - ASSERT_NO_ERROR(fs::create_hard_link(Twine(TempPath), Twine(TempPath2))); + ASSERT_NO_ERROR(fs::create_link(Twine(TempPath), Twine(TempPath2))); bool equal; ASSERT_NO_ERROR(fs::equivalent(Twine(TempPath), Twine(TempPath2), equal)); EXPECT_TRUE(equal); |