[cfe-dev] Partial Pre-processing Question

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 18 06:48:45 PST 2015


I am wondering if there is some hidden option or mechanism in CLang that I
can use to pre-process like '-E' or '-frewrite-includes', but which does not
expand the headers from the system include directories?

 

There are often times when I would like this type of capability, so that I
can create test-cases for reported bug, but have them remain valid with
future revisions of the compiler and its supporting headers and libraries.
It is not uncommon for a new version of a system header (ISO C, ISO C++, or
our own extended headers) to have changes that are not 100% compatible with
the results of the expanded result of an older version.

 

The headers belonging to the programmer and their source need to be
expanded, but I would like to retain the unexpanded system headers, and in
particular not expand the macros defined in a system header, and leave the
system headers as '#include <sysheadername>'.

 

Thanks,

 

            MartinO - Movidius Ltd.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151118/cbc67bb6/attachment.html>


More information about the cfe-dev mailing list