This is an archive of the discontinued LLVM Phabricator instance.

[ADT][NFC] Add extra typedefs to `ArrayRef` and `MutableArrayRef`
ClosedPublic

Authored by vinograd47 on Jan 28 2021, 6:05 AM.

Details

Summary
  • value_type
  • pointer
  • const_pointer
  • reference
  • const_reference
  • const_reverse_iterator
  • size_type
  • difference_type

It makes ArrayRef and MutableArrayRef types fully compliant with STL Container concept.

Diff Detail

Event Timeline

vinograd47 created this revision.Jan 28 2021, 6:05 AM
vinograd47 requested review of this revision.Jan 28 2021, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2021, 6:05 AM
lattner accepted this revision.Jan 28 2021, 1:15 PM

Thanks!

This revision is now accepted and ready to land.Jan 28 2021, 1:15 PM

Rebased to latest main branch.

vinograd47 updated this revision to Diff 322137.Feb 8 2021, 9:14 AM

Removed std:: namespace from size_t and ptrdiff_t.

vinograd47 updated this revision to Diff 322346.Feb 9 2021, 4:38 AM

Removed const qualifier from ArrayRef::value_type.

Rebased and fixed ArrayRef typedefs

@lattner I've finalized the change and fixed CI failures. Please take a look one more time.

@courbet I saw in git history that you have had similar commit, which was reverted. Could you please take a look at this change?

courbet accepted this revision.Feb 26 2021, 5:26 AM

Nice, thanks. I tried that a couple years back but had ARM buildbot errors that maintainers were not able to expain. Let's hope it goes better this time !