[cfe-dev] Merging of translation units.

Enea Zaffanella zaffanella at cs.unipr.it
Tue Dec 13 06:56:41 PST 2011


Hello.

We would like to know what kind of support is already available in clang
(or it is planned to be available in the near future) concerning the
goal described below.

In rough words, we would like to "logically merge" the ASTs resulting
from the parsing of many translation units so as to be able to query
their information as if they were coming from a single, well-formed AST.

The physical representation of the "logically merged" AST would be based
on the component translation units, but avoiding the duplications caused
by common inclusions so that the merged AST satisfies, at least, the
common ODR constraints. Also, we would like to be able to obtain
canonical versions of the declarations introduced/referenced across the
many component TUs.

Is there anything similar implemented in clang (or publicly available in
a separate project based on clang)? Are there implemented services that,
even though not a solution, could be used as a good starting point?

Thanks in advance for any useful info.

Enea.



More information about the cfe-dev mailing list