[llvm-dev] pragma and function insertion

Julien Schmitt via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 13 10:12:49 PDT 2019

Dear community,

For my project, I defined a #pragma and i would like clang to replace this pragma by a function call.

After reading tutorials, I managed to write a plugin which is able to parse and recognize this pragma.

Now I have some difficulties to transform this pragma into a function call.

My comprehension is that I need first to declare a new annotation token and insert it in the stream.

Then I should process this token and call the function I want.
Is this approach correct? Can a frontendAction do this job?

However, I have the feeling this process should be very common and probably the solution is already written somewhere ...  Does anybody have a similar example?

Thanks a lot !

Julien Schmitt
13/15 rue Jeanne Braconnier, 92360 Meudon La ForĂȘt,  France
Mob : +33 6 66 81 08 76
Email: julien.schmitt at vsora.com
Web: www.vsora.com<http://www.vsora.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190613/9d68e49d/attachment.html>

More information about the llvm-dev mailing list