[cfe-dev] Howto inject code

Phil Bouchard via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 15 17:38:09 PST 2017


On 11/15/2017 10:43 AM, David Blaikie via cfe-dev wrote:
> I'd look at how things like the Sanitizers are implemented - as 
> modifications during Clang's IR Generation step.
> 
> I'm not sure there are plugin extensibility points (or whether there 
> could ever reasonably enough such extensibility points to make that 
> worthwhile) - but when it comes to outright modifying the Clang source 
> code, the Sanitizers should give you some sense of where/how one might 
> do that.

Ok thanks.

I personally believe it would be awesome to be able to edit the AST 
tree, disregarding synchronization of the pointers to the original 
source code and streaming out from scratch text based of the new AST 
tree. That would simplify all operations.


Regards,
-Phil



More information about the cfe-dev mailing list