diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-29 21:26:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-29 21:26:49 +0000 |
commit | 3ed45fe2be4356351942a2cfe9bd92e996d4fcad (patch) | |
tree | db0f4e0ca1ab5bea02dd42f312770d37b539a1e7 /unittests | |
parent | 096880b59008a44860edd0fcab1f55aa1363bdf5 (diff) | |
download | llvm-3ed45fe2be4356351942a2cfe9bd92e996d4fcad.tar.gz llvm-3ed45fe2be4356351942a2cfe9bd92e996d4fcad.tar.bz2 llvm-3ed45fe2be4356351942a2cfe9bd92e996d4fcad.tar.xz |
Include st_dev to make the result of getUniqueID actually unique.
This will let us use getUniqueID instead of st_dev directly on clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Support/Path.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp index 2f19bb2944..165668d61b 100644 --- a/unittests/Support/Path.cpp +++ b/unittests/Support/Path.cpp @@ -169,7 +169,7 @@ TEST_F(FileSystemTest, Unique) { fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath)); // The same file should return an identical unique id. - uint64_t F1, F2; + fs::UniqueID F1, F2; ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F1)); ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), F2)); ASSERT_EQ(F1, F2); @@ -180,7 +180,7 @@ TEST_F(FileSystemTest, Unique) { ASSERT_NO_ERROR( fs::createTemporaryFile("prefix", "temp", FileDescriptor2, TempPath2)); - uint64_t D; + fs::UniqueID D; ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D)); ASSERT_NE(D, F1); ::close(FileDescriptor2); @@ -190,7 +190,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))); - uint64_t D2; + fs::UniqueID D2; ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath2), D2)); ASSERT_EQ(D2, F1); |