diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-19 01:47:53 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-04-19 01:47:53 +0000 |
| commit | 9eb309371b55c44395ef7651f41e0d9ece223e60 (patch) | |
| tree | cabf3f75938a45a5d928e75bb67367d9c9defc51 /clang | |
| parent | cf97cf669310b190a8ca82b163edfcc1b8659459 (diff) | |
| download | bcm5719-llvm-9eb309371b55c44395ef7651f41e0d9ece223e60.tar.gz bcm5719-llvm-9eb309371b55c44395ef7651f41e0d9ece223e60.zip | |
Try to work around failure to convert this lambda to a function pointer in some versions of GCC.
llvm-svn: 235264
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 217203192ca..b522dadb9dc 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -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. |

