clang analysis program in dram rather in file

Hi All,
       I am writing a simple OpenCL program function parser which get the
the qualifier of parameter,
like _global, __constant.
       I have a problem here, I implemented this by modifying a clang
sample. I saw most sample get input from files. Due to the project
property, the source file is already in a char * array.
Now I implemented a version: First output data from array to a file ,and
then use sourceManager to load file into memory again. I think there should
be overhead by doing this, but I don't know how to do with other method.

I don't know which class or interface should I use , can anyone help me ?

Hi All,
       I am writing a simple OpenCL program function parser which get the
the qualifier of parameter,
like _global, __constant.
       I have a problem here, I implemented this by modifying a clang
sample. I saw most sample get input from files. Due to the project
property, the source file is already in a char * array.
Now I implemented a version: First output data from array to a file ,and
then use sourceManager to load file into memory again. I think there should
be overhead by doing this, but I don't know how to do with other method.

I don't know which class or interface should I use , can anyone help me ?

Clang supports the idea of "virtual files", which you can inject via the
SourceManager. You can find some samples of how to use those throughout the
code base...

Cheers,
/Manuel