Got rid of unwieldy -include Solaris.h portability solution, replacing it with interposed header and moving endian defines into Host.h.
Fixes PR28370.
Differential D34136
[Solaris] replace Solaris.h hack with a set of better hacks fedor.sergeev on Jun 13 2017, 1:33 AM. Authored by
Details
Got rid of unwieldy -include Solaris.h portability solution, replacing it with interposed header and moving endian defines into Host.h. Fixes PR28370.
Diff Detail Event TimelineComment Actions LLVM/Clang build passes on Sparc/X86-Solaris11/Solaris12. Comment Actions Verified that sys/regset.h works by adding Btw, there is one catch here, gcc reports a pedantic warning on include_next: In file included from llvm/lib/CodeGen/LivePhysRegs.cpp:16:0: llvm/include/llvm/Support/Solaris/sys/regset.h:18:2: warning: #include_next is a GCC extension #include_next <sys/regset.h> I can silence this warning by adding into sys/regset.h interposing header, but I'm not sure whats the policy for using GCC pragmas in LLVM project...
Comment Actions module.modulemap: exclude Solaris/sys/regset.h Comment Actions Ahem... I'm not sure that "Support/Solaris/sys/regset.h" is a right name for this module thing. Besides, it doesnt belong to the Support module in any practical way. To me it is more akin to normal system headers. Comment Actions removing module.modulemap entry for sys/regset.h.
Comment Actions Perhaps, the use of __BYTE_ORDER__ in ItaniumDemangle.cpp is dictated by its declared "independence": // It also has no dependencies on the rest of llvm. It is implemented this way // so that it can be easily reused in libcxxabi. I was going to adapt it to Endian.h use, and now I'm not that sure. I believe I'm done here :-) |
Can't you use sys/byteorder.h or is that post-Solaris11?