[cfe-dev] Retrieve included header files

Zheng Wang jason.wangz at gmail.com
Sun Jun 19 00:38:30 PDT 2011


Thanks Marko.

2011/6/19 Marko Schütz Schmuck <MarkoSchuetz at web.de>

> 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




-- 
Best regards,

WANG Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110619/3c7dd6e9/attachment.html>


More information about the cfe-dev mailing list