[cfe-dev] how to get -ast-print to work?

Marko Schütz MarkoSchuetz at web.de
Thu Feb 4 12:02:38 PST 2010


At Thu, 04 Feb 2010 07:21:01 -0700,
Charles Davis wrote:
> 
> Marko Schütz wrote:
> > When I use -ast-print like below, I get an error.
> > 
> > marko at prpad:tmp% clang -cc1 col.c -ast-print
> > gcc: unrecognized option '-cc1'
> > /tmp/cc-05816a.s: Assembler messages:
> > /tmp/cc-05816a.s:4: Warning: unterminated string; newline inserted
> > /tmp/cc-05816a.s:5: Warning: unterminated string; newline inserted
> > gcc: unrecognized option '-cc1'
> > 
> ...
> > This is with clang-2.6.
> That's from before clang and clang-cc became a single executable. If you
> want to print the AST with LLVM 2.6 clang, you have to run clang-cc
> directly:
> 
>  /usr/pkg/libexec/clang-cc col.c -ast-print

that solves my problem, thanks.

Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100204/f21fd73b/attachment.sig>


More information about the cfe-dev mailing list