This is an archive of the discontinued LLVM Phabricator instance.

[NFC][IR] Make Module::getAliasList() private
ClosedPublic

Authored by vporpo on Feb 13 2023, 3:34 PM.

Details

Summary

This patch adds several missing AliasList modifier functions, like
removeAlias(), eraseAlias() and insertAlias().
There is no longer need to access the list directly so it also makes
getAliaList() private.

Diff Detail

Event Timeline

vporpo created this revision.Feb 13 2023, 3:34 PM
vporpo requested review of this revision.Feb 13 2023, 3:34 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 13 2023, 3:34 PM
aeubanks added inline comments.Feb 13 2023, 4:05 PM
llvm/include/llvm/IR/Module.h
573

this isn't used outside tests, remove?

vporpo added inline comments.Feb 13 2023, 4:12 PM
llvm/include/llvm/IR/Module.h
573

Isn't it better to keep it for completeness? I don't feel strongly about it though, either way is fine with me.

aeubanks added inline comments.Feb 13 2023, 4:17 PM
llvm/include/llvm/IR/Module.h
566

use the imperative Detach instead of Detaches (same below)

573

I think it's better to add it only if we actually use it. Besides, I don't think people generally care about the order of aliases.

576

I'd drop the Please

577
vporpo updated this revision to Diff 497150.Feb 13 2023, 4:46 PM
vporpo marked an inline comment as done.

Addressed comments

This revision is now accepted and ready to land.Feb 13 2023, 5:12 PM
This revision was landed with ongoing or failed builds.Feb 13 2023, 7:05 PM
This revision was automatically updated to reflect the committed changes.