Skip to content

NFC: Take a const Module for iter... functions#8822

Merged
stevenfontanella merged 1 commit into
mainfrom
non-const-iter
Jun 10, 2026
Merged

NFC: Take a const Module for iter... functions#8822
stevenfontanella merged 1 commit into
mainfrom
non-const-iter

Conversation

@stevenfontanella

@stevenfontanella stevenfontanella commented Jun 9, 2026

Copy link
Copy Markdown
Member

Even if the visitor takes a mutable pointer param e.g. Function*, it still works since the pointers aren't a member of a the Module itself but stored in a separate unique_ptr.

Also use a forwarding reference for visitor to avoid copies.

For use in #8823.

@stevenfontanella stevenfontanella marked this pull request as ready for review June 9, 2026 23:36
@stevenfontanella stevenfontanella requested a review from a team as a code owner June 9, 2026 23:36
@stevenfontanella stevenfontanella requested review from kripken and removed request for a team June 9, 2026 23:36
@stevenfontanella stevenfontanella enabled auto-merge (squash) June 9, 2026 23:43
@stevenfontanella stevenfontanella merged commit 62c74d7 into main Jun 10, 2026
16 checks passed
@stevenfontanella stevenfontanella deleted the non-const-iter branch June 10, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants