[cfe-dev] how to precompile headers

Ted Kremenek kremenek at apple.com
Wed May 12 23:52:02 PDT 2010


On May 11, 2010, at 3:31 PM, Jochen Wilhelmy wrote:

> Hi!
>> Yes. IIRC, you can use the -x flag to compile the header
>> 
>> 
> this sounds good, but I'd like to know how it works using the libraries.
> Of course I can create the .gch like you told me, but then I want to
> use a clang class to load it.
> 
> -Jochen

The CompilerInstance and ASTUnit classes are good places to start (both are in libFrontend).  You can also take a look at CIndex.cpp, which uses these classes to vend a C interface to Clang for building source code tools.



More information about the cfe-dev mailing list