[cfe-dev] [llvm-dev] Adding the some static buffer content to the beginning and end of C file .

mats petersson via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 12 11:16:34 PDT 2017


Do you mean something like:

cat before.c > temp.c
cat sourcefile.c >> temp.c
cat after.c >> temp.c
clang temp.c ...

or something that does that also to header files included by the
sourcefile.c ?

I'm not sure I know the answer, but I think the distinction is important to
be able to answer this.

(I'm reasonably sure it's not really Lex/Parser that is the parts you want
to look at, SourceFileManager or something around there is more likely to
be your area of interest - I could be heading in the wrong direction tho' -
I only know scattered parts of how clang works)

--
Mats

On 12 June 2017 at 17:41, Umesh Kalappa via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi All,
>
> I'm new to Lex/Parser code of Clang , we are trying to append some
> static buffer to the beginning and end of every C file we open for
> compilation and investigating the same, how we do?
>
> Any reference or hints  from experts ,how we can do , will be
> appreciated and save our time a lot .
>
>
> Thank you
> ~Umesh
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170612/993d4306/attachment.html>


More information about the cfe-dev mailing list