r330561 - [XRay] Change std::sort to llvm::sort in response to r327219
Mandeep Singh Grang via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 22 17:49:25 PDT 2018
Author: mgrang
Date: Sun Apr 22 17:49:25 2018
New Revision: 330561
URL: http://llvm.org/viewvc/llvm-project?rev=330561&view=rev
Log:
[XRay] 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.
Modified:
cfe/trunk/lib/Driver/XRayArgs.cpp
Modified: cfe/trunk/lib/Driver/XRayArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/XRayArgs.cpp?rev=330561&r1=330560&r2=330561&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/XRayArgs.cpp (original)
+++ cfe/trunk/lib/Driver/XRayArgs.cpp Sun Apr 22 17:49:25 2018
@@ -163,7 +163,7 @@ XRayArgs::XRayArgs(const ToolChain &TC,
}
// Then we want to sort and unique the modes we've collected.
- std::sort(Modes.begin(), Modes.end());
+ llvm::sort(Modes.begin(), Modes.end());
Modes.erase(std::unique(Modes.begin(), Modes.end()), Modes.end());
}
}
More information about the cfe-commits
mailing list