On Tue, Mar 21, 2017 at 02:01:19PM +0200, Manolis Pissadakis via llvm-dev
wrote:> Hello everyone,
>
> I hope that this is the right list to post this question. If not, kindly
> accept our apologies for any inconvenience.
> We are trying to use the LLVM compiler to support custom pragma annotation
> in a source code. As we have already seen this transformation is also part
> of the Clang LLVM ' s front-end . Because of the lack of
documentation,
> could you give as the procedure in order to achieve that? For example, we
> would like to modify the Clang/LLVM source code to support a "#pragma
> myfunc x" annotation, which will be substituted by the code of
myfunc(x) .
> Will it be possible ?
Hi manolis,
this is a common issue and the documentation is quite sparse; I've
written small walkthrough on the different point you need to hack in
clang to support this, here:
http://blog.quarkslab.com/implementing-a-custom-directive-handler-in-clang.html
Hope it helps