This is an archive of the discontinued LLVM Phabricator instance.

Rename and fix ValueMap::resize to reserve
ClosedPublic

Authored by arkangath on May 11 2022, 7:08 AM.

Details

Summary

The underlying map type (DenseMap) has had its resize() function renamed to reserve() as part of c04fc7a60ff4ea4610ea157be006c9771224a7b6 (SVN 264026).

This is only visible when the member function is called, as it is template type name dependent.

Diff Detail

Event Timeline

arkangath created this revision.May 11 2022, 7:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 7:08 AM
arkangath requested review of this revision.May 11 2022, 7:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 7:08 AM
svenvh added a subscriber: svenvh.May 11 2022, 7:13 AM

Does it mean that there are no in-tree user for this API?
Are you gonna rename this to reserve as a follow-up patch? I'm not sure I got entirely why not rename it now (that is this API is broken anyway...)?

Does it mean that there are no in-tree user for this API?

This would indicate yes.
I presume no one else (anywhere) uses it either otherwise we'd have been given a build failure bug report.

Are you gonna rename this to reserve as a follow-up patch? I'm not sure I got entirely why not rename it now (that is this API is broken anyway...)?

I intended to have the smallest impact on the patch, and commit as a build fix rather than an API change.
It can be renamed on this patch to reserve() on this patch if that's the preference.

Yeah probably best to rename it as the same time here. This won't break anyone considering the current state!
Thanks.

arkangath updated this revision to Diff 428908.May 12 2022, 5:06 AM
arkangath retitled this revision from Build fix for ValueMap:resize to Rename and fix ValueMap::resize to reserve.
arkangath edited the summary of this revision. (Show Details)
mehdi_amini accepted this revision.May 12 2022, 5:07 AM

Thanks!

This revision is now accepted and ready to land.May 12 2022, 5:07 AM

Please note that I do not have commit rights.

svenvh accepted this revision.May 12 2022, 5:48 AM

LGTM.

Please note that I do not have commit rights.

I can take care of landing it.

This revision was landed with ongoing or failed builds.May 12 2022, 6:01 AM
This revision was automatically updated to reflect the committed changes.