Skip to content

Commit

Permalink
Fix C++17 std::iterator deprecation warning in CodeGenFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
gbossu authored and konstantinschwarz committed May 1, 2024
1 parent d5670ad commit 9f01d2a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions llvm/utils/TableGen/CodeGenFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,14 @@ class TGFieldLayout {
/// NOTE: We can also implement a base abstract class defining the interface
/// of this iterator and then make it derives from it (could be nice if we need
/// to implement a BFS version of this iterator).
class TGFieldIterator
: public std::iterator<std::forward_iterator_tag, TGFieldIterator> {
class TGFieldIterator {
public:
using iterator_category = std::forward_iterator_tag;
using value_type = TGFieldIterator;
using difference_type = std::ptrdiff_t;
using pointer = TGFieldIterator *;
using reference = TGFieldIterator &;

/// Traversal Modes
enum class Mode { FullTraversal, StopTraversal };

Expand Down

0 comments on commit 9f01d2a

Please sign in to comment.