[cfe-dev] Custom Pragmas Clang Tools
Marcos Horro Varela via cfe-dev
cfe-dev at lists.llvm.org
Fri Jan 3 07:44:39 PST 2020
That is exactly what I was looking for.
Thank you so much.
Regards,
H.
http://gac.udc.es/~horro<https://link.getmailspring.com/link/A61E266C-E8F7-4B91-A998-F84B6C37E6E4@getmailspring.com/0?redirect=http%3A%2F%2Fgac.udc.es%2F~horro&recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D>
On Jan 3 2020, at 8:21 am, Michael Kruse <llvm at meinersbur.de> wrote:
You can create your own executable that creates a CompilerInstance and
adds pragma handles to it.
Example shown here:
https://github.com/Meinersbur/pet/blob/master/pet.cc#L1139
Michael
Am So., 29. Dez. 2019 um 00:32 Uhr schrieb Marcos Horro Varela via
cfe-dev <cfe-dev at lists.llvm.org>:
Hello,
I have been reading some articles [1, 2] regarding how to implement handlers for custom pragmas. Nonetheless, in those posts Clang source code has to be modified. I am developing an Clang tool out-of-tree, so I do not want to make a custom version of Clang. I was just wondering if it is possible to build a custom handler for pragmas out-of-tree or if I have to tackle another approach maybe using annotations (?) or any other workaround? Basically I want to use pragmas for indicating loops of interest for the tool in C/C++ code.
Thanks!
Regards,
[1] https://blog.quarkslab.com/implementing-a-custom-directive-handler-in-clang.html
[2] https://git.scc.kit.edu/CES/clang-custom-pragma
H.
http://gac.udc.es/~horro
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
https://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/20200103/7a0809dc/attachment-0001.html>
More information about the cfe-dev
mailing list