MaxEW707 wrote:

> Users (Chromium included) use recent versions of Clang that are not vendored 
> by Microsoft. Users can also use the LLVM OSS releases. I think most users 
> probably won't notice the compile time regression, and it will silently go 
> away the next time the update MSVC, but if they do and they care (and this 
> should be in the release notes), it would be nice to have a macro to get the 
> old behavior. 

I thought of another solution this morning that can work. Looks like we already 
have precedent with redefining macros in clang's interposing MSVC headers. 
`vadefs.h` for example.

MSVC STL would like to replace 
[_STL_INTRIN_HEADER](https://github.com/microsoft/STL/blob/main/stl/inc/yvals_core.h#L2038)
 macro with just `#include <intrin0.h>` when they support the version of clang 
shipped with `intrin0.h`.

We could provide our own `yvals_core.h` header like so:
```
#include_next <yvals_core.h>

#if defined(_MSC_VER_) && defined(_STL_INTRIN_HEADER)
#undef _STL_INTRIN_HEADER
#define _STL_INTRIN_HEADER #include <intrin0.h>
#endif
```

This should also fix users upgrading clang while still building against an 
older MSVC STL. Once MSVC STL moves forward we can probably remove this 
interposing header sometime in the future.

https://github.com/llvm/llvm-project/pull/75711
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to