This is an archive of the discontinued LLVM Phabricator instance.

Cleanup include dependencies for LLVMTableGen
ClosedPublic

Authored by serge-sans-paille on Jan 27 2022, 8:14 AM.

Details

Summary

Based on the output of include-what-you-use. No other library seems affected by
the new forward declaration.

$ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/TableGen/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 795231
after: 750654

Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup

Diff Detail

Event Timeline

serge-sans-paille requested review of this revision.Jan 27 2022, 8:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 8:14 AM

contexts with diff could be useful

contexts with diff could be useful

I purposely removed them to avoid uploading too large of a diff file :-/ I'll do that

Reupload with context

(style) Please can you run clang-format on the includes to sort them correctly?

llvm/lib/TableGen/DetailedRecordsBackend.cpp
26

Looks like clang-format is complaining about the include sort order?

llvm/lib/TableGen/JSONBackend.cpp
20

Again, sort the includes

clang-format includes

RKSimon accepted this revision.Jan 28 2022, 2:21 AM

LGTM

This revision is now accepted and ready to land.Jan 28 2022, 2:21 AM
This revision was landed with ongoing or failed builds.Jan 28 2022, 2:51 AM
This revision was automatically updated to reflect the committed changes.