[cfe-dev] Modifying clang AST using a plugin

Blaise Tine via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 13 10:15:49 PST 2020


 Hi all,
I would like to modify the clang AST using a plugin.I have following the suggestions of using clang Rewriter object.I use compiler.createDefaultOutputFile() to obtain the output stream to write the changed file into.the compilation works fine but the generated object file is broken. I get the following linker error: "Wrong file format".
Question:- Is it actually possible to update the AST using a clang plugin?- What am I doing wrong with my solution?- Can someone point me to an example program that does that?
Thanks,-Blaise
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200113/dce652c1/attachment.html>


More information about the cfe-dev mailing list