mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 00:46:45 +08:00
[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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user