mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-04 19:17:12 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user