[cfe-dev] Using Clang parser to generate AST in memory

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 30 05:03:59 PST 2015


Docs for libtooling are here:
http://clang.llvm.org/docs/LibTooling.html

On Mon, Nov 30, 2015 at 12:34 PM Russell Wallace via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> I need to use the Clang parser to parse C++ source code, in this case to
> AST rather than IR; that is, I'm looking to supply filenames and get back
> syntax trees as in-memory data structures. What's the best way to do this?
> I got as far as tracing the driver code to FinalPhase = phases::Compile;
> which looks like what I need to do, but I can't see what to call to get
> back the AST?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151130/7523bf1a/attachment.html>


More information about the cfe-dev mailing list