[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 14:56:13 PST 2023


rnk wrote:

> > What I'd like to see is a pull request sent to https://github.com/microsoft/stl with some agreement about how to structure the ifdefs so we can use intrin0.h when it is available.
> 
> Sounds good I'll do that.

Thanks!

> I was thinking I could use `__has_include_next`. If `__has_include_next(<intrin0.h>)` is true then we know clang is providing its own `intrin0.h`.
> 
> Another option I had was to preemptively get a PR up to MSVC STL with a `__clang_major__` check for clang 18 assuming this PR gets in before the release window.
> 
> A custom name like `intrin_msstl.h` works for me as well.

I think we can be flexible, and the important thing is that our solution should work for them.

https://github.com/llvm/llvm-project/pull/75711


More information about the cfe-commits mailing list