[cfe-dev] How to visit an OpenCL kernel source code using Clang library
Jorge Fernández Fabeiro
fabeirojorge at gmail.com
Wed Nov 16 01:33:45 PST 2011
Hello,
I'm trying to visit an OpenCL kernal source code using Clang library in
order to do some source-to-source transformations in it. Now, my program is
able to visit and transform C standard code, but when I pass into it some
.cl file, it simply does nothing. Of course, I have installed OpenCL in the
system I'm using, even I've tested it compiling and executing some sample
programs.
I've been searching the Internet for a while and I've found some references
to a way for making Clang compatible with OpenCL, but it only applies when
you're using Clang as a tool (it consist only on passing "-x cl" to the
command-line execution), not as a library included in another program. I've
also tried to add the path to OpenCL headers to my HeaderSearch (creating
an instance of HeaderSearchOptions, adding the path to it with AddPath and
then applying the changes with ApplyHeaderSearchOptions).
Is there any other solution to this, or I'm right but I'm forgetting any
step in the process?
Thank you so much in advance,
Jorge.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111116/d4a91df1/attachment.html>
More information about the cfe-dev
mailing list