Try to work around failure to convert this lambda to a function pointer in some versions of GCC.
llvm-svn: 235264
This commit is contained in:
parent
cf97cf6693
commit
9eb309371b
|
@ -2073,10 +2073,11 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) {
|
|||
|
||||
// Sort the set of macro definitions that need to be serialized by the
|
||||
// name of the macro, to provide a stable ordering.
|
||||
llvm::array_pod_sort(MacroDirectives.begin(), MacroDirectives.end(),
|
||||
[](const MacroChain *A, const MacroChain *B) -> int {
|
||||
return A->first->getName().compare(B->first->getName());
|
||||
});
|
||||
int (*Cmp)(const MacroChain*, const MacroChain*) =
|
||||
[](const MacroChain *A, const MacroChain *B) -> int {
|
||||
return A->first->getName().compare(B->first->getName());
|
||||
};
|
||||
llvm::array_pod_sort(MacroDirectives.begin(), MacroDirectives.end(), Cmp);
|
||||
|
||||
// Emit the macro directives as a list and associate the offset with the
|
||||
// identifier they belong to.
|
||||
|
|
Loading…
Reference in New Issue