[cfe-dev] Driver support for AST features (UI Proposal)

Sebastian Redl sebastian.redl at getdesigned.at
Tue Sep 1 00:58:14 PDT 2009

Daniel Dunbar wrote:
> Hi all,
> This is a UI design proposal for the clang driver for providing user /
> tool access to clang AST based features.
>  1. Support '-emit-ast'; this will be an option like '-S' in that it
> stops compilation at the AST production phase, and will generate files
> with a '.ast' suffix.
>  2. Recognize '.ast' files as source inputs which can be compiled.
> Obviously this will start at the compilation phase, in the same way
> that '.i' etc inputs bypass the preprocessing phase.
> Comments?
Isn't this essentially the same as first emitting a PCH made from the
entire source file, and then compiling an empty source file with a PCH
include directive? In other words, don't we pretty much already support
this, albeit with a weird command syntax?


More information about the cfe-dev mailing list