[cfe-dev] Rewriting #include in a source-to-source translator

Craig Silverstein csilvers at google.com
Wed Dec 1 13:36:23 PST 2010


} I have not registered the callback. What are the steps I need to
} follow to create PPCallbacks? Is there any other pass in clang which
} does the same?

I'm not sure, exactly -- at Google we have some magic that does some
of the registration work, which I'm not familiar with.  But there
might be examples inside clang?  Or you could try google code search
for ASTFrontendAction and see if there are any other examples out
there that do this.

I'm hoping to opensource include-what-you-use, and one thing I'll have
to figure out is how to rewrite the driver to not use the google
libraries.  But I haven't had a chance to look at that yet.

craig



More information about the cfe-dev mailing list