This is an archive of the discontinued LLVM Phabricator instance.

Move TargetRegistry.(h|cpp) from Support to MC
ClosedPublic

Authored by rnk on Oct 8 2021, 11:59 AM.

Details

Summary

This moves the registry higher in the LLVM library dependency stack.
Every client of the target registry needs to link against MC anyway to
actually use the target, so we might as well move this out of Support.

This allows us to ensure that Support doesn't have includes from MC/*.

Diff Detail

Event Timeline

rnk created this revision.Oct 8 2021, 11:59 AM
rnk requested review of this revision.Oct 8 2021, 12:00 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project, Restricted Project. · View Herald Transcript

Seems like a reasonable move to me.

llvm/include/llvm/MC/TargetRegistry.h
17–19

Should be LLVM_MC_TARGETREGISTRY_H now.

1373

Same here.

llvm/lib/MC/TargetRegistry.cpp
54–55

I'm guessing this formatting crept in because of the file move (also in the header). Might be nice to reduce the diff by clang-formatting the two files ahead of time.

rnk added a comment.Oct 8 2021, 1:27 PM

Thanks for the review! I uploaded it a bit quickly because I wanted to kick off Bazel presubmit testing, since I haven't replicated that locally.

rnk updated this revision to Diff 378361.Oct 8 2021, 2:40 PM
  • fix formatting issues
This revision is now accepted and ready to land.Oct 8 2021, 2:48 PM
MaskRay accepted this revision.Oct 8 2021, 2:50 PM

Thanks!

This revision was landed with ongoing or failed builds.Oct 8 2021, 2:53 PM
This revision was automatically updated to reflect the committed changes.
lhames added a subscriber: lhames.Oct 8 2021, 2:53 PM

Yeah -- this seems like a good idea to me. Thanks Reid!