This is an archive of the discontinued LLVM Phabricator instance.

Provide path to Solaris.h include (Bug 28370)
AbandonedPublic

Authored by ro on May 31 2017, 2:58 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ro created this revision.May 31 2017, 2:58 AM
ro added a subscriber: llvm-commits.Jun 2 2017, 6:24 AM

My personal opinion is that -include is the wrong way of doing the work.

At least part of this code (endian) perhaps should go to include/llvm/Support/Host.h.

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!).

Please, see https://reviews.llvm.org/D34136 for a presumably better fix.