diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 21:35:40 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 21:35:40 +0000 |
commit | 15ae783e1487666b5c84f2defdf566cb0435ad95 (patch) | |
tree | b4ffc5cfa0c408fe21ac6d10480a35e484a6997b /clang/lib/AST/VTableBuilder.cpp | |
parent | b0f74b24faa4bbbe5f07facb1e414c94e03ab428 (diff) | |
download | bcm5719-llvm-15ae783e1487666b5c84f2defdf566cb0435ad95.tar.gz bcm5719-llvm-15ae783e1487666b5c84f2defdf566cb0435ad95.zip |
[C++11] Convert sort predicates into lambdas.
No functionality change.
llvm-svn: 203289
Diffstat (limited to 'clang/lib/AST/VTableBuilder.cpp')
-rw-r--r-- | clang/lib/AST/VTableBuilder.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp index d975dbe3639..eb5fa328559 100644 --- a/clang/lib/AST/VTableBuilder.cpp +++ b/clang/lib/AST/VTableBuilder.cpp @@ -3244,10 +3244,6 @@ void MicrosoftVTableContext::computeVTablePaths(bool ForVBTables, Changed = rebucketPaths(Paths); } -static bool pathCompare(const VPtrInfo *LHS, const VPtrInfo *RHS) { - return LHS->MangledPath < RHS->MangledPath; -} - static bool extendPath(VPtrInfo *P) { if (P->NextBaseToMangle) { P->MangledPath.push_back(P->NextBaseToMangle); @@ -3265,7 +3261,10 @@ static bool rebucketPaths(VPtrInfoVector &Paths) { // ordering is based on pointers, but it doesn't change our output order. The // current algorithm is designed to match MSVC 2012's names. VPtrInfoVector PathsSorted(Paths); - std::sort(PathsSorted.begin(), PathsSorted.end(), pathCompare); + std::sort(PathsSorted.begin(), PathsSorted.end(), + [](const VPtrInfo *LHS, const VPtrInfo *RHS) { + return LHS->MangledPath < RHS->MangledPath; + }); bool Changed = false; for (size_t I = 0, E = PathsSorted.size(); I != E;) { // Scan forward to find the end of the bucket. |