Commit Graph

8 Commits

Author SHA1 Message Date
Alastair Houghton
e339feb2da [Runtime] Add format string attributes.
Added some attributes to mark functions as taking format strings.

rdar://84571859
2021-10-25 13:46:05 +01:00
Kuba (Brecka) Mracek
de015c6464 Unify asprintf/vasprintf implementations and make them truly portable by using vsnprintf (#39314) 2021-09-15 21:09:03 -07:00
Kuba (Brecka) Mracek
404badb49a Introduce SWIFT_ENABLE_REFLECTION to turn on/off the support for Mirrors and reflection (#33617) 2021-09-08 13:08:13 -07:00
Robert Widmann
2497f45290 [NFC] Add Some Missing 'override's 2021-02-02 10:47:49 -08:00
Parker Schuh
4e39e59a8a Add a field reflection function that constructs keypaths. (#34815)
While the existing _forEachField in ReflectionMirror.swift
already gives the offsets and types for each field, this isn't
enough information to construct a keypath for that field in
order to modify it.

For reference, this should be sufficent to implement the features
described here: (https://forums.swift.org/t/storedpropertyiterable/19218/62)
purely at runtime without any derived conformances for many types.

Note: Since there isn't enough reflection information for
`.mutatingGetSet` fields, this means that we're not able to support
reflecting certain types of fields (functions, nonfinal class fields,
etc). Whether this is an error or not is controlled by the `.ignoreUnknown`
option.
2020-11-30 09:17:23 -08:00
Mike Ash
90033fe4cf [Runtime] Fix const cast warning in ReflectionMirror.cpp
rdar://problem/70444932
2020-11-02 13:51:28 -05:00
John McCall
0fb407943f [NFC] Rename swift_runtime_unreachable to swift_unreachable and make it use LLVM's support when available. 2020-10-03 02:54:56 -04:00
Kuba (Brecka) Mracek
6b40a092b9 Move the actual Obj-C parts of ReflectionMirror.mm into a separate file, make ReflectionMirror.mm a .cpp file (#34025) 2020-09-25 07:29:03 -07:00