aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Headers/__stddef_nullptr_t.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Headers/__stddef_nullptr_t.h')
-rw-r--r--clang/lib/Headers/__stddef_nullptr_t.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Headers/__stddef_nullptr_t.h b/clang/lib/Headers/__stddef_nullptr_t.h
index 183d394d56c1..7f3fbe6fe0d3 100644
--- a/clang/lib/Headers/__stddef_nullptr_t.h
+++ b/clang/lib/Headers/__stddef_nullptr_t.h
@@ -7,7 +7,12 @@
*===-----------------------------------------------------------------------===
*/
-#ifndef _NULLPTR_T
+/*
+ * 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(_NULLPTR_T) || \
+ (__has_feature(modules) && !__building_module(_Builtin_stddef))
#define _NULLPTR_T
#ifdef __cplusplus