mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[C++11] Revert uses of lambdas with array_pod_sort.
Looks like GCC implements the lambda->function pointer conversion differently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -127,6 +127,11 @@ const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) {
|
||||
return TheTarget;
|
||||
}
|
||||
|
||||
static int TargetArraySortFn(const std::pair<StringRef, const Target *> *LHS,
|
||||
const std::pair<StringRef, const Target *> *RHS) {
|
||||
return LHS->first.compare(RHS->first);
|
||||
}
|
||||
|
||||
void TargetRegistry::printRegisteredTargetsForVersion() {
|
||||
std::vector<std::pair<StringRef, const Target*> > Targets;
|
||||
size_t Width = 0;
|
||||
@@ -136,11 +141,7 @@ void TargetRegistry::printRegisteredTargetsForVersion() {
|
||||
Targets.push_back(std::make_pair(I->getName(), &*I));
|
||||
Width = std::max(Width, Targets.back().first.size());
|
||||
}
|
||||
array_pod_sort(Targets.begin(), Targets.end(),
|
||||
[](const std::pair<StringRef, const Target *> *LHS,
|
||||
const std::pair<StringRef, const Target *> *RHS) {
|
||||
return LHS->first.compare(RHS->first);
|
||||
});
|
||||
array_pod_sort(Targets.begin(), Targets.end(), TargetArraySortFn);
|
||||
|
||||
raw_ostream &OS = outs();
|
||||
OS << " Registered Targets:\n";
|
||||
|
Reference in New Issue
Block a user