[cfe-dev] regarding user defined pragmas
Kirk Kelsey
kelsey at etinternational.com
Wed Nov 10 17:07:01 PST 2010
Arvind,
My understanding is that you'll need to add a pragma handler specifically for it (building on the PragmaHandler class). Depending on what the pragma does (assuming it needs to be represented in LLVM IR) you'll need to create the appropriate representation too.
I'm at the beginning stages of doing the same thing. I hope someone else will chime in if the blind are leading the blind down the wrong path.
Kirk
see also:
http://clang.llvm.org/doxygen/classclang_1_1PragmaHandler.html
http://llvm.org/releases/1.5/docs/ExtendingLLVM.html#intrinsic
On Nov 10, 2010, at 7:45 PM, Arvind Sudarsanam wrote:
> Hi,
>
> I want to be able to include a #pragma directive in my C code, run it through clang and let the directive be available on the LLVM side (as part of the LLVM IR code) so that I can parse it using a LLVM pass.
>
> Is there any way to do it? Currently, the pragma directive just disappears.
>
> Thanks
> Arvind
>
> Arvind Sudarsanam
> Software Engineer
> CPU Technology Inc.
> 1500 Kansas Ave, Suite 3E, Longmont, CO - 80503
> asudarsanam at cputech.com
> Ph: 435-512-7769
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101110/2fe53078/attachment.html>
More information about the cfe-dev
mailing list