[PATCH] D22774: [MSVC] Add ARM support to intrin.h for MSVC compatibility

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 11:06:15 PDT 2016

mstorsjo added a comment.

In https://reviews.llvm.org/D22774#507014, @compnerd wrote:

> Why `include_next` the header if not on Windows?

Mostly because intrin.h uses the same logic. Normally, there's probably no such system header in other SDKs, but say if you happen to have a custom one named like that (on a non-windows platform unaware that windows happens to have a system header named like that) and clang's builtin header gets picked first, include the next one in the include directory chain instead - i.e. pretend like this one doesn't exist. (That is, either pick the one you want, or error out saying it isn't found.)

I don't mind particularly much though, I just picked this logic since intrin.h was using it as well. Just having the header be `#ifdef _MSC_VER {content} #endif`, or `#ifndef _MSC_VER #error #else {content} #endif` also would be fine for me.


More information about the cfe-commits mailing list