Page MenuHomePhabricator

[Symbol] Add DeclVendor::FindTypes
ClosedPublic

Authored by xiaobai on Jun 26 2019, 4:57 PM.

Details

Summary

Following up on the plan I outlined in D63622, we can remove the
dependence on clang in all the places where we only want to find the
types from the DeclVendor. This means that currently DeclVendor depends
on clang, but centralizing the dependency makes it easier to refactor
cleanly.

Diff Detail

Repository
rL LLVM

Event Timeline

xiaobai created this revision.Jun 26 2019, 4:57 PM
labath resigned from this revision.Jul 1 2019, 1:21 AM

Besides picking at code style details, I don't believe I have anything useful to add here. :)

source/Plugins/Language/ObjC/ObjCLanguage.cpp
939–941 ↗(On Diff #206768)

I don't think using auto is helpful here -- we have many classes to represent "types", and it's not clear that this is talking about CompilerType. If you want to shorten this, I'd suggest folding the FindTypes call into the for loop:
for (const CompilerType &type : decl_vendor->FindTypes(...)).

xiaobai updated this revision to Diff 207425.Jul 1 2019, 3:45 PM

Pavel's suggestion

jingham accepted this revision.Jul 1 2019, 5:24 PM

LGTM

This revision is now accepted and ready to land.Jul 1 2019, 5:24 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 12:56 PM