[llvm] r259211 - [RS4GC] Address post-commit review on r259208 from David
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 29 09:20:49 PST 2016
Author: sanjoy
Date: Fri Jan 29 11:20:49 2016
New Revision: 259211
URL: http://llvm.org/viewvc/llvm-project?rev=259211&view=rev
Log:
[RS4GC] Address post-commit review on r259208 from David
NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=259211&r1=259210&r2=259211&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Fri Jan 29 11:20:49 2016
@@ -1523,21 +1523,18 @@ static void StabilizeOrder(SmallVectorIm
struct BaseDerivedPair {
Value *Base;
Value *Derived;
-
- BaseDerivedPair(Value *B, Value *D) : Base(B), Derived(D) {}
};
SmallVector<BaseDerivedPair, 64> NameOrdering;
NameOrdering.reserve(BaseVec.size());
for (size_t i = 0, e = BaseVec.size(); i < e; i++)
- NameOrdering.emplace_back(BaseVec[i], LiveVec[i]);
-
- auto Compare = [](BaseDerivedPair &L, BaseDerivedPair &R) {
- return L.Derived->getName() < R.Derived->getName();
- };
+ NameOrdering.push_back({BaseVec[i], LiveVec[i]});
- std::sort(NameOrdering.begin(), NameOrdering.end(), Compare);
+ std::sort(NameOrdering.begin(), NameOrdering.end(),
+ [](BaseDerivedPair &L, BaseDerivedPair &R) {
+ return L.Derived->getName() < R.Derived->getName();
+ });
for (size_t i = 0; i < BaseVec.size(); i++) {
BaseVec[i] = NameOrdering[i].Base;
More information about the llvm-commits
mailing list