================
@@ -7,6 +7,11 @@
  *===-----------------------------------------------------------------------===
  */
 
-#ifndef offsetof
+/*
+ * When -fbuiltin-headers-in-system-modules is set this is a non-modular header
+ * and needs to behave as if it was textual.
+ */
+#if !defined(offsetof) ||                                                      
\
+    (__has_feature(modules) && !__building_module(_Builtin_stddef))
----------------
vsapsai wrote:

I was thinking about `offsetof` being defined in some header, not in the 
intended system one. And then we [transitively] include 
"\_\_stddef_offsetof.h". Does it mean that in this case "\_\_stddef_offsetof.h" 
is processed only when 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