diff --git a/include/llvm/ADT/iterator_range.h b/include/llvm/ADT/iterator_range.h index d004ead71f9..ecaf4a2f64d 100644 --- a/include/llvm/ADT/iterator_range.h +++ b/include/llvm/ADT/iterator_range.h @@ -49,7 +49,7 @@ template iterator_range make_range(T x, T y) { return iterator_range(std::move(x), std::move(y)); } -template iterator_range make_range(std::pair p) { +template iterator_range make_range(std::pair p) { return iterator_range(std::move(p.first), std::move(p.second)); } } diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index b918a045635..0b2a2ff8263 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -660,10 +660,12 @@ public: const MCSymbol *getFunctionBeginSym() const { return FunctionBeginSym; } const MCSymbol *getFunctionEndSym() const { return FunctionEndSym; } - iterator_range findImportedEntitiesForScope(const MDNode *Scope) const { + iterator_range + findImportedEntitiesForScope(const MDNode *Scope) const { return make_range(std::equal_range( ScopesWithImportedEntities.begin(), ScopesWithImportedEntities.end(), - std::pair(Scope, nullptr), less_first())); + std::pair(Scope, nullptr), + less_first())); } /// \brief A helper function to check whether the DIE for a given Scope is