[cfe-dev] How to view .ast file?

Wenhan Gu nowar100 at gmail.com
Tue May 17 15:15:31 PDT 2011


Hi,

Maybe this is what you want.

$ clang++ -cc1 -ast-print file1.cc

2011/5/18 Ted Kremenek <kremenek at apple.com>

> AST files are binary files.  They are not human readable.  What are you
> trying to do?
>
> On May 17, 2011, at 12:54 PM, hunter wrote:
>
> > Hi,
> >
> > I'm creating some .ast files using the following command
> >
> > clang++ -emit-ast file1.cc -o file1.ast
> >
> > But when I open file1.ast directly I only see corrupted characters. Is
> there
> > any way I can view them as normal ast file? Or I misunderstood something?
> >
> > Thanks,
> > Chen
> >
> > --
> > View this message in context:
> http://clang-developers.42468.n3.nabble.com/How-to-view-ast-file-tp2953991p2953991.html
> > Sent from the Clang Developers mailing list archive at Nabble.com.
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



-- 
Best regards,
Wen-Han
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110518/00b59265/attachment.html>


More information about the cfe-dev mailing list