std::vector<IndexAddressPair> SortedMap(indexToAddressBegin(),
indexToAdddessEnd());
// Sorting address in increasing order of indices.
- llvm::sort(SortedMap,
- [](const IndexAddressPair &A, const IndexAddressPair &B) {
- return A.first < B.first;
- });
+ llvm::sort(SortedMap, llvm::less_first());
for (auto &Pair : SortedMap)
dbgs() << Twine::utohexstr(Pair.second) << "\t" << Pair.first << "\n";
}
std::vector<IndexAddressPair> SortedMap(AM->second.indexToAddressBegin(),
AM->second.indexToAdddessEnd());
// Sorting address in increasing order of indices.
- llvm::sort(SortedMap,
- [](const IndexAddressPair &A, const IndexAddressPair &B) {
- return A.first < B.first;
- });
+ llvm::sort(SortedMap, llvm::less_first());
uint8_t AddrSize = CU->getAddressByteSize();
uint32_t Counter = 0;
AMIter->second.indexToAddressBegin(),
AMIter->second.indexToAdddessEnd());
// Sorting address in increasing order of indices.
- llvm::sort(SortedMap,
- [](const IndexAddressPair &A, const IndexAddressPair &B) {
- return A.first < B.first;
- });
+ llvm::sort(SortedMap, llvm::less_first());
// Writing out Header
const uint32_t Length = SortedMap.size() * AddrSize + 4;
support::endian::write(AddressStream, Length, Endian);
for (auto &KeyVal : StubGroups) {
for (StubTy &Elem : KeyVal.second)
Elem.first = BBAddresses[Elem.second];
- llvm::sort(KeyVal.second,
- [&](const std::pair<uint64_t, BinaryBasicBlock *> &LHS,
- const std::pair<uint64_t, BinaryBasicBlock *> &RHS) {
- return LHS.first < RHS.first;
- });
+ llvm::sort(KeyVal.second, llvm::less_first());
}
};