[PATCH] D33716: Provide path to Solaris.h include (Bug 28370)

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 14:58:10 PDT 2017


On Fri, Jun 09, 2017 at 09:09:50PM +0000, Fedor Sergeev via Phabricator via llvm-commits wrote:
> fedor.sergeev added a comment.
> 
> In https://reviews.llvm.org/D33716#772362, @krytarowski wrote:
> 
> > My personal opinion is that `-include` is the wrong way of doing the work.
> 
> 
> While generally I would agree with this sentiment, there is one part of Solaris.h which is very hard to do w/o -include.
> I mean all those #undef ES/DS register macro names, that pollute user space after including Solaris sys/regset.h.
> You need to perform these undefs immediately after the first include of regset.h, otherwise you are doomed
> to hit confusing results of the aforementioned pollution (that nobody else sees on other platforms!).

A sys/regset.h wrapper using #include_next might work just as well, if
this is the only reason.

Joerg


More information about the llvm-commits mailing list