[PATCH] D49067: Stop wrapping __has_include in another macro

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 23 17:27:30 PDT 2018


mclow.lists accepted this revision.
mclow.lists added inline comments.
This revision is now accepted and ready to land.


================
Comment at: include/__config:153
+#ifndef __has_include
+#define __has_include(...) 0
 #endif
----------------
rsmith wrote:
> arichardson wrote:
> > EricWF wrote:
> > > I do prefer not hijacking this name, but if it's needed to make things work, then it's OK with me.
> > > 
> > > @mclow.lists Are you OK if we steal this identifier and `#define` it ourselves.
> > This is the correct way of dealing with missing `__has_include()` according to @rsmith
> If you would prefer to not define this name yourself, the other option would be to replace all uses of `__has_include(blah)` with
> 
> ```
> #ifdef __has_include
> #if __has_include(blah)
> //...
> #endif
> #endif
> ```
Agreed with @EricWF in general - we prefer to wrap rather than hijack other people's names.

However, we can't wrap here, so I'm ok with the hijack.



Repository:
  rCXX libc++

https://reviews.llvm.org/D49067





More information about the cfe-commits mailing list