[cfe-dev] Rewriting #include in a source-to-source translator
santosh.nagarakatte at gmail.com
Tue Nov 30 13:52:52 CST 2010
I am writing a source to source translator for C. I have a rewriter
similar to RewriteObjC.cpp.
I am rewriting all header files and hence during the rewriting phase,
I want to change the #includes " .." in the file being translated to
the appropriate translated file.
To accomplish this, my rewriter currently inherits the ASTConsumer and
PPCallbacks. I have defined the function InclusionDirective in my
rewriter. However the callback is not being called when I test it on
a simple test file which has #includes.
What am I doing wrong? Any suggestions?
Santosh G Nagarakatte,
Computer and Information Science Department
University of Pennsylvania,
More information about the cfe-dev