This is an archive of the discontinued LLVM Phabricator instance.

[SymbolFile] Remove the SymbolContext parameter from FindTypes
Needs ReviewPublic

Authored by zturner on Jan 11 2019, 1:56 PM.

Details

Summary

This parameter was only ever used with the Module set, and since a SymbolFile is tied to a module, the parameter turns out to be entirely unnecessary. Furthermore, it doesn't make a lot of sense to ask a caller to ask SymbolFile which is tied to Module X to find types for Module Y, but that possibility was open with the previous interface. By removing this parameter from the API, it makes it harder to use incorrectly as well as easier for an implementor to understand what it needs to do.

This change is still mostly mechanical, although the effects trickled out a bit higher than with other similar patches. I did manually verify that every call-site was either setting nothing at all, or only setting the module field of the SymbolContext.

Diff Detail

Event Timeline

zturner created this revision.Jan 11 2019, 1:56 PM
labath accepted this revision.Jan 17 2019, 8:23 AM

This makes sense to me.

This revision is now accepted and ready to land.Jan 17 2019, 8:23 AM
labath resigned from this revision.Aug 9 2019, 1:59 AM
This revision now requires review to proceed.Aug 9 2019, 1:59 AM