[cfe-dev] Howto inject code

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 15 07:43:43 PST 2017

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.

- Dave

On Tue, Nov 14, 2017 at 7:59 PM Phil Bouchard via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Greetings,
> Clang is pretty impressive but I was wondering what is the best way to
> inject code in an existing source file?
> I would like to add parameters to all function declarations, function
> calls, base classes and each compound statement.
> Regards,
> -Phil
> _______________________________________________
> 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/20171115/b5562f6d/attachment.html>

More information about the cfe-dev mailing list