[cfe-commits] [PATCH v3] Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Peter Collingbourne peter at pcc.me.uk
Sat Jun 12 16:42:46 PDT 2010

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen.  This is suboptimal for
clients which only wish to make use of the frontend.  CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries.  The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
 - Fixed some copy-paste mistakes in the header files
 - Modified certain aspects of the coding to comply with the LLVM
   Coding Standards

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Break-Frontend-s-dependency-on-Rewrite-Checker-and-C.patch
Type: text/x-diff
Size: 44735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100613/fe32a951/attachment.patch>

More information about the cfe-commits mailing list