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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Gerolf Hoflehner via llvm-dev
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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

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

Gerolf Hoflehner via llvm-dev
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 <[hidden email]> 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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev