Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C++17 std::iterator deprecation warning in CodeGenFormat #19

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading