This is an archive of the discontinued LLVM Phabricator instance.

Cleanup LLVMRemarks includes
ClosedPublic

Authored by serge-sans-paille on Jan 28 2022, 12:47 PM.

Details

Summary

Based on the output of include-what you-use.

Most notably, llvm/Remarks/Remark.h is no longer automatically included by
llvm/Remarks/RemarkParser.h, so client code may need to include explicitly.

clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Remarks/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 770253
after: 759347

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 28 2022, 12:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 12:47 PM

Most notably, llvm/Remarks/Remark.h is no longer automatically included by llvm/Remarks/RemarkParser.h, so client code may need to include explicitly.

Should be this be mentioned in the release notes?

Most notably, llvm/Remarks/Remark.h is no longer automatically included by llvm/Remarks/RemarkParser.h, so client code may need to include explicitly.

Should be this be mentioned in the release notes?

Probably seems less necessary to me. There are many header include changes in one release.
This change is a quite mechanical and is easy to fix. The downstream projects can adapt without much difficulty.

MaskRay accepted this revision.Jan 28 2022, 1:39 PM
This revision is now accepted and ready to land.Jan 28 2022, 1:39 PM
RKSimon accepted this revision.Jan 28 2022, 2:02 PM

Fair enough LGTM

thegameg accepted this revision.Jan 28 2022, 2:33 PM
thegameg added a subscriber: thegameg.

Thank you!

This revision was landed with ongoing or failed builds.Jan 31 2022, 2:16 AM
This revision was automatically updated to reflect the committed changes.