This revision was automatically updated to reflect the committed changes.
Closed by commit rGa314a36aaa1d: [lldb] Fix deprecation warning for using
std::iterator (authored by thakis).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134844/new/
https://reviews.llvm.org/D134844
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
#include "DWARFDeclContext.h"
#include "DWARFUnit.h"
+#include "llvm/ADT/iterator.h"
+
using namespace lldb_private;
using namespace lldb_private::dwarf;
@@ -24,7 +26,9 @@
/// convenience, the starting die is included in the sequence as the first
/// item.
class ElaboratingDIEIterator
- : public std::iterator<std::input_iterator_tag, DWARFDIE> {
+ : public llvm::iterator_facade_base<
+ ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+ std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
// The operating invariant is: top of m_worklist contains the "current" item
// and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
Next();
return *this;
}
- ElaboratingDIEIterator operator++(int) {
- ElaboratingDIEIterator I = *this;
- Next();
- return I;
- }
friend bool operator==(const ElaboratingDIEIterator &a,
const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
return a.m_worklist.empty() == b.m_worklist.empty();
return a.m_worklist.back() == b.m_worklist.back();
}
- friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
- return !(a == b);
- }
};
llvm::iterator_range<ElaboratingDIEIterator>
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
#include "DWARFDeclContext.h"
#include "DWARFUnit.h"
+#include "llvm/ADT/iterator.h"
+
using namespace lldb_private;
using namespace lldb_private::dwarf;
@@ -24,7 +26,9 @@
/// convenience, the starting die is included in the sequence as the first
/// item.
class ElaboratingDIEIterator
- : public std::iterator<std::input_iterator_tag, DWARFDIE> {
+ : public llvm::iterator_facade_base<
+ ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+ std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
// The operating invariant is: top of m_worklist contains the "current" item
// and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
Next();
return *this;
}
- ElaboratingDIEIterator operator++(int) {
- ElaboratingDIEIterator I = *this;
- Next();
- return I;
- }
friend bool operator==(const ElaboratingDIEIterator &a,
const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
return a.m_worklist.empty() == b.m_worklist.empty();
return a.m_worklist.back() == b.m_worklist.back();
}
- friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
- return !(a == b);
- }
};
llvm::iterator_range<ElaboratingDIEIterator>
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits