[cfe-dev] ast dump logic

Unai Lopez ulopez009 at ikasle.ehu.es
Wed Apr 11 00:30:22 PDT 2012


Hi,

i don't know if this is what you are looking for, but i use the following
command to create the AST of a code file from the command line:

clang -cc1 -ast-dump -x <LANGUAGE> <INPUT_FILE>

For example, to generate the AST of an OpenCL kernel file: clang -cc1
-ast-dump -x cl file.cl > output.ast

2012/4/11 akshay ratnaparkhi <ackk007 at gmail.com>

> Hi all,
>         Can any one tell me what is logic or code of ast dump. how the
> clang dump the ast on console using dump option.
>
> thanks.
>  akshay
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120411/02f98293/attachment.html>


More information about the cfe-dev mailing list