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

Russell Wallace via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 30 03:34:10 PST 2015


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151130/c66850c7/attachment.html>


More information about the cfe-dev mailing list