[LLVMdev] Clang and AST Generation
John McCall
rjmccall at apple.com
Thu Nov 5 00:22:14 PST 2009
Pushkar Ratnalikar wrote:
> Hello,
This is more appropriate for cfe-dev, not llvmdev. I'm forward this
there; please follow-up only to that list.
> I am trying to use Clang to generate AST for C code in a different
> format. This format is specific to the term rewriting system that we
> use for source-to-source transformations.
>
> Studying the ast generated by Clang using the "-ast-print" option to
> the clang-cc, I see that the pre-processor expands the code(expected).
> Is there a way to get around and not print all the information all the
> information and also keep the AST as close to the source as possible(
> avoiding constant folding).
Could you clarify what you mean by not printing all the information?
We have several different textual AST dumping mechanisms in various
states of decay, but I didn't realize any of them did constant folding.
John.
More information about the llvm-dev
mailing list