From c205d8cc8dcce3d9f47f9d78c03eed7820d265e9 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Grang Date: Tue, 27 Mar 2018 16:50:00 +0000 Subject: [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 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 2748dc34226..e1cb3242021 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1294,7 +1294,7 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(const Decl *D, AddedAttr = true; } if (!Features.empty()) { - std::sort(Features.begin(), Features.end()); + llvm::sort(Features.begin(), Features.end()); Attrs.addAttribute("target-features", llvm::join(Features, ",")); AddedAttr = true; } -- cgit v1.2.3