aaron.ballman added a comment.

In D146187#4205271 <https://reviews.llvm.org/D146187#4205271>, @ChuanqiXu wrote:

>> Ugh, that does sort of change the calculus for whether we do or don't claim 
>> support on Windows. If removing the definition of that macro on Windows 
>> causes significant code breakage, that would be a reason we should leave it 
>> defined. But do we have evidence of that?
>
> Ah, yes. This is what I want to say. Simply, if we remove the definition for 
> `__cpp_impl_coroutines`, the coroutine header in MS/STL and libstdc++ can't 
> work anymore. For libstdc++, all the coroutine things are only defined if 
> `__cpp_impl_coroutines ` is defined 
> (https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/coroutine#L58-L69).
>  And this is the same for MS/STL: 
> https://github.com/microsoft/STL/blob/5116678ea11245b232a6e43824aad25fb60b9c6e/stl/inc/yvals_core.h#L1587-L1589
>  and 
> https://github.com/microsoft/STL/blob/be29af22c049774ae93f2c33e4eb5d801e12216c/stl/inc/coroutine#L17-L39.
>  So I can image that many uses of coroutines in Windows may get useless after 
> we undefined the `__cpp_impl_coroutines` macros.

Okay, that pretty much paints us into a corner, I guess. If we don't define it 
any longer, we break existing (working) uses of the feature on Windows, but we 
defined it prematurely. In this case, let's leave the macro defined so we don't 
break existing uses -- in the future, I think we should be more conservative 
with defining feature test macros.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146187/new/

https://reviews.llvm.org/D146187

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to