This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Remove uses of deprecated `std::iterator`
ClosedPublic

Authored by zero9178 on Aug 6 2022, 4:02 AM.

Details

Summary

std::iterator has been deprecated in C++17 and some standard library implementations such as MS STL or libc++ emit deperecation messages when using the class.
Since LLVM has now switched to C++17 these will emit warnings on these implementations, or worse, errors in build configurations using -Werror.

This patch fixes these issues by replacing them with LLVMs own llvm::iterator_facade_base which offers a superset of functionality of std::iterator.

Diff Detail

Event Timeline

zero9178 created this revision.Aug 6 2022, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2022, 4:02 AM
zero9178 requested review of this revision.Aug 6 2022, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2022, 4:02 AM
thieta accepted this revision.Aug 6 2022, 4:05 AM

Thanks for fixing this!

This revision is now accepted and ready to land.Aug 6 2022, 4:05 AM
zero9178 updated this revision to Diff 450512.Aug 6 2022, 4:30 AM

Fix typo; Rerun CI

This revision was automatically updated to reflect the committed changes.