diff options
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index a5c31a56fad..5d9f5a328ae 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -106,10 +106,11 @@ collectContributionData(DWARFContext::unit_iterator_range Units) { // Sort the contributions so that any invalid ones are placed at // the start of the contributions vector. This way they are reported // first. - llvm::sort(Contributions.begin(), Contributions.end(), + llvm::sort(Contributions, [](const Optional<StrOffsetsContributionDescriptor> &L, const Optional<StrOffsetsContributionDescriptor> &R) { - if (L && R) return L->Base < R->Base; + if (L && R) + return L->Base < R->Base; return R.hasValue(); }); |