diff --git a/stdlib/public/core/StringGuts.swift b/stdlib/public/core/StringGuts.swift index bb9fa152bb0..8493e47b71d 100644 --- a/stdlib/public/core/StringGuts.swift +++ b/stdlib/public/core/StringGuts.swift @@ -84,6 +84,19 @@ extension _StringGuts { } else { fatalError("Unimplemented string form") } + +#if arch(i386) || arch(arm) + _sanityCheck(MemoryLayout.size == 12, """ + the runtime is depending on this, update Reflection.mm and \ + this if you change it + """) +#else + _sanityCheck(MemoryLayout.size == 16, """ + the runtime is depending on this, update Reflection.mm and \ + this if you change it + """) +#endif + #endif // INTERNAL_CHECKS_ENABLED }