This is an archive of the discontinued LLVM Phabricator instance.

[clang] Make access to submodules via `iterator_range`
ClosedPublic

Authored by Stoorx on Apr 21 2023, 1:23 PM.

Details

Summary

In file clang/lib/Basic/Module.cpp the Module class had submodule_begin() and submodule_end() functions to retrieve corresponding iterators for private vector of Modules. This commit removes mentioned functions, and replaces all of theirs usages with submodules() function and range-based for-loops.

Diff Detail

Event Timeline

Stoorx created this revision.Apr 21 2023, 1:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2023, 1:23 PM
Stoorx requested review of this revision.Apr 21 2023, 1:23 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 21 2023, 1:23 PM
phosek accepted this revision.Apr 21 2023, 1:46 PM

LGTM

This revision is now accepted and ready to land.Apr 21 2023, 1:46 PM

Can you commit it? I have no commit access.

Stoorx
me[at]stoorx.one

This revision was automatically updated to reflect the committed changes.
barannikov88 added inline comments.
clang/include/clang/Basic/Module.h
744–747

There was no need to delete these, they were useful (e.g. the change in Sema.cpp).
Well, I guess I'm late.