This is an archive of the discontinued LLVM Phabricator instance.

Reduce inclusion of clang headers.
ClosedPublic

Authored by brucem on Sep 17 2015, 9:15 PM.

Details

Summary

With the recent changes to separate clang from the core structures
of LLDB, many inclusions of clang headers can be removed.

Diff Detail

Repository
rL LLVM

Event Timeline

brucem updated this revision to Diff 35058.Sep 17 2015, 9:15 PM
brucem retitled this revision from to Reduce inclusion of clang headers..
brucem updated this object.
brucem added a reviewer: clayborg.
brucem added a subscriber: lldb-commits.
clayborg accepted this revision.Sep 18 2015, 9:28 AM
clayborg edited edge metadata.

Very nice.

This revision is now accepted and ready to land.Sep 18 2015, 9:28 AM

It would be great if there were an automated tool that could detect when any #include wasn't needed for both headers and implementation files.

This revision was automatically updated to reflect the committed changes.

Possibly we can try to run IWYU (https://github.com/include-what-you-use/include-what-you-use). I haven't tried it but it sounds like a tool what is suitable for the task.

I downloaded a build of IWYU over the weekend, but haven't had the time to look at using it yet!

I did find a couple of places where we can alter the included headers though (patch coming this week) to include less and IWYU wouldn't catch those, so I'll still do some manual inspection to remove clang stuff on top of using IWYU. :)