================
@@ -7,7 +7,7 @@
  *===-----------------------------------------------------------------------===
  */
 
-#if !defined(NULL) || !__has_feature(modules)
+#if !defined(NULL) || !__building_module(_Builtin_stddef)
----------------
ian-twilightcoder wrote:

```
#if !defined(NULL) || !__has_feature(modules) || (__has_feature(modules) && 
!__building_module(_Builtin_stddef))
```
If `!__has_feature(modules)` then `__building_module(anything)` is `0`. So you 
can make these substitutions without changing the logic.
```
!__has_feature(modules)
!__has_feature(modules) && !__building_module(_Builtin_stddef)

!__has_feature(modules) || (__has_feature(modules) && 
!__building_module(_Builtin_stddef))
(!__has_feature(modules) && !__building_module(_Builtin_stddef)) || 
(__has_feature(modules) && !__building_module(_Builtin_stddef))

(!a && b) || (a && b)
b

(!__has_feature(modules) && !__building_module(_Builtin_stddef)) || 
(__has_feature(modules) && !__building_module(_Builtin_stddef))
!__building_module(_Builtin_stddef)
```

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

Reply via email to