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/lib/CodeGen/TargetInfo.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/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 466253c..45c0ec4 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -8513,7 +8513,7 @@ static bool appendRecordType(SmallStringEnc &Enc, const RecordType *RT, // The ABI requires unions to be sorted but not structures. // See FieldEncoding::operator< for sort algorithm. if (RT->isUnionType()) - std::sort(FE.begin(), FE.end()); + llvm::sort(FE.begin(), FE.end()); // We can now complete the TypeString. unsigned E = FE.size(); for (unsigned I = 0; I != E; ++I) { @@ -8557,7 +8557,7 @@ static bool appendEnumType(SmallStringEnc &Enc, const EnumType *ET, EnumEnc += '}'; FE.push_back(FieldEncoding(!I->getName().empty(), EnumEnc)); } - std::sort(FE.begin(), FE.end()); + llvm::sort(FE.begin(), FE.end()); unsigned E = FE.size(); for (unsigned I = 0; I != E; ++I) { if (I) |