Commit Graph

4 Commits

Author SHA1 Message Date
Rintaro Ishizaki
8b7e720b52 [Tests] IRGen/section_structs.swift requires 'optimized_stdlib'
rdar://119899895
2023-12-21 09:49:33 -08:00
Erik Eckstein
a7de231499 tests: disable IRGen/section_structs.swift for 32-bit
The `StaticString("hello").utf8Start` test fails on 32 bit
2023-12-19 19:24:18 +01:00
Erik Eckstein
ee71376f74 tests: add a test for static StaticString.utf8Start globals
Check that `StaticString("some string literal").utf8Start` can be put into a statically initialized global
2023-12-15 17:11:50 +01:00
Kuba Mracek
145f12f6a3 Allow using structs with trivial initializers in globals that require static initialization (e.g. @_section attribute)
Before this change, if a global variable is required to be statically initialized (e.g. due to @_section attribute), we don't allow its type to be a struct, only a scalar type works. This change improves on that by teaching MandatoryPerformanceOptimizations pass to inline struct initializer calls into initializer of globals, as long as they are simple enough so that we can be sure that we don't trigger recursive/infinite inlining.
2023-07-08 19:26:59 -07:00