This is an archive of the discontinued LLVM Phabricator instance.

Initial attempt to restructure libTooling and move parts out that don't need to depend on lib/AST.
ClosedPublic

Authored by djasper on Oct 24 2014, 7:21 AM.

Details

Reviewers
klimek
Summary

This is an approach to split libTooling into two parts. This should not require any change to libTooling users.

Alternatively, we could move some of these to lib/Rewrite. However, that would mean, we should also change the namespace of clang::tooling::Replacement and that is something that is used frequently by libTooling users.

This restructuring cuts the remaining dependency on clang-format on lib/AST effectively cutting its binary size in half.

Once we settle on a structure, I'll also update the Makefiles.

Diff Detail

Event Timeline

djasper updated this revision to Diff 15412.Oct 24 2014, 7:21 AM
djasper retitled this revision from to Initial attempt to restructure libTooling and move parts out that don't need to depend on lib/AST..
djasper updated this object.
djasper edited the test plan for this revision. (Show Details)
djasper added a reviewer: klimek.
djasper added a subscriber: Unknown Object (MLST).
klimek added inline comments.Oct 27 2014, 9:18 PM
lib/Tooling/Core/Replacement.cpp
257–262

Am I missing something or did you also cut the dependency on TextDiagnosticPrinter?

djasper added inline comments.Oct 28 2014, 1:09 AM
lib/Tooling/Core/Replacement.cpp
257–262

Yeah, sorry for not calling this out. TextDiagnosticPrinter isn't really used/necessary here and is part of clangFrontend which in turn also depends on clangAST.

klimek accepted this revision.Oct 28 2014, 1:16 PM
klimek edited edge metadata.

Lg

This revision is now accepted and ready to land.Oct 28 2014, 1:16 PM
djasper closed this revision.Nov 13 2014, 9:38 AM

Submitted as r220867.