aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-29 21:26:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-29 21:26:49 +0000
commit7f822a9306f2818f9cbb020e96f97ce9b97dbc9a (patch)
treeb8707194402ac2ce3a440c4fb2fddc5275e3b68f /llvm/unittests/Support/Path.cpp
parent64fad60e34f7a2cd4b497f7cc496ee1728b2bfc6 (diff)
downloadllvm-7f822a9306f2818f9cbb020e96f97ce9b97dbc9a.zip
llvm-7f822a9306f2818f9cbb020e96f97ce9b97dbc9a.tar.gz
llvm-7f822a9306f2818f9cbb020e96f97ce9b97dbc9a.tar.bz2
Include st_dev to make the result of getUniqueID actually unique.
This will let us use getUniqueID instead of st_dev directly on clang. llvm-svn: 187378
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 2f19bb2..165668d 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/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);