mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #14117 from milseman/sanitime_runty
[string] sanity check for runtime size
This commit is contained in:
@@ -84,6 +84,19 @@ extension _StringGuts {
|
||||
} else {
|
||||
fatalError("Unimplemented string form")
|
||||
}
|
||||
|
||||
#if arch(i386) || arch(arm)
|
||||
_sanityCheck(MemoryLayout<String>.size == 12, """
|
||||
the runtime is depending on this, update Reflection.mm and \
|
||||
this if you change it
|
||||
""")
|
||||
#else
|
||||
_sanityCheck(MemoryLayout<String>.size == 16, """
|
||||
the runtime is depending on this, update Reflection.mm and \
|
||||
this if you change it
|
||||
""")
|
||||
#endif
|
||||
|
||||
#endif // INTERNAL_CHECKS_ENABLED
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user