diff options
author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-27 16:50:00 +0000 |
---|---|---|
committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-27 16:50:00 +0000 |
commit | c205d8cc8dcce3d9f47f9d78c03eed7820d265e9 (patch) | |
tree | 3e4c2781e80d071551b7ad85dbcbd7fa2fbd6b72 /clang/unittests/Basic/VirtualFileSystemTest.cpp | |
parent | 52396bb9c55044063c25bc19e8f22e32d4df11e3 (diff) | |
download | llvm-c205d8cc8dcce3d9f47f9d78c03eed7820d265e9.zip llvm-c205d8cc8dcce3d9f47f9d78c03eed7820d265e9.tar.gz llvm-c205d8cc8dcce3d9f47f9d78c03eed7820d265e9.tar.bz2 |
[clang] Change std::sort to llvm::sort in response to r327219
r327219 added wrappers to std::sort which randomly shuffle the container before
sorting. This will help in uncovering non-determinism caused due to undefined
sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of
std::sort.
llvm-svn: 328636
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
-rw-r--r-- | clang/unittests/Basic/VirtualFileSystemTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp index f9efbea..13c246e 100644 --- a/clang/unittests/Basic/VirtualFileSystemTest.cpp +++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp @@ -471,7 +471,7 @@ TEST(VirtualFileSystemTest, BrokenSymlinkRealFSRecursiveIteration) { } // Check sorted contents. - std::sort(Contents.begin(), Contents.end()); + llvm::sort(Contents.begin(), Contents.end()); EXPECT_EQ(Expected.size(), Contents.size()); EXPECT_TRUE(std::equal(Contents.begin(), Contents.end(), Expected.begin())); } @@ -488,8 +488,8 @@ static void checkContents(DirIter I, ArrayRef<StringRef> ExpectedOut) { for (DirIter E; !EC && I != E; I.increment(EC)) InputToCheck.push_back(I->getName()); - std::sort(InputToCheck.begin(), InputToCheck.end()); - std::sort(Expected.begin(), Expected.end()); + llvm::sort(InputToCheck.begin(), InputToCheck.end()); + llvm::sort(Expected.begin(), Expected.end()); EXPECT_EQ(InputToCheck.size(), Expected.size()); unsigned LastElt = std::min(InputToCheck.size(), Expected.size()); |