[cfe-dev] Retrieve included header files

Marko Schütz Schmuck MarkoSchuetz at web.de
Sat Jun 18 14:20:59 PDT 2011


At Thu, 16 Jun 2011 13:34:39 +0100,
Zheng Wang wrote:
> 
> Hi,
> 
> Is there any way to retrieves the names of header files that are included in a source in clang?

look at the class PreprocessingRecord. You create a PreprocessingRecord
before starting the pre-processor. After pre-processing you can use
PreprocessingRecord::iterator to look at each pre-processor event that
was recorded. The kind of pre-processor event you are interested in is
PreprocessedEntity::InclusionDirectiveKind.

Best regards,

Marko 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110618/8bffda44/attachment.sig>


More information about the cfe-dev mailing list