@@ -292,7 +292,7 @@ func _unimplementedInitializer(className: StaticString,
292292
293293#if !$Embedded
294294
295- /// Used to evaluate editor placeholders.
295+ /// Previously used to evaluate editor placeholders.
296296public // COMPILER_INTRINSIC
297297func _undefined< T> (
298298 _ message: @autoclosure ( ) -> String = String ( ) ,
@@ -303,7 +303,7 @@ func _undefined<T>(
303303
304304#else
305305
306- /// Used to evaluate editor placeholders.
306+ /// Previously used to evaluate editor placeholders.
307307public // COMPILER_INTRINSIC
308308func _undefined< T> (
309309 _ message: @autoclosure ( ) -> StaticString = StaticString ( ) ,
@@ -314,6 +314,38 @@ func _undefined<T>(
314314
315315#endif
316316
317+ /// Called when evaluating an editor placeholder in a playground.
318+ ///
319+ /// We always export this into the client since it should never be used in an
320+ /// actual shipping binary and keeps it a pure compiler implementation detail.
321+ ///
322+ /// This function should not be inlined in desktop Swift because it is cold and
323+ /// inlining just bloats code. In Embedded Swift, we force inlining as this
324+ /// function is typically just a trap (in release configurations).
325+ #if !$Embedded
326+ @inline ( never)
327+ #else
328+ @inline ( __always)
329+ #endif
330+ @_alwaysEmitIntoClient // COMPILER_INTRINSIC
331+ internal func _undefinedEditorPlaceholder(
332+ _filenameStart: Builtin . RawPointer ,
333+ _filenameLength: Builtin . Word ,
334+ _filenameIsASCII: Builtin . Int1 ,
335+ _line: Builtin . Word
336+ ) -> Never {
337+ _assertionFailure (
338+ " Fatal error " ,
339+ " attempt to evaluate editor placeholder " ,
340+ file: StaticString (
341+ _start: _filenameStart,
342+ utf8CodeUnitCount: _filenameLength,
343+ isASCII: _filenameIsASCII) ,
344+ line: UInt ( _line) ,
345+ flags: 0
346+ )
347+ }
348+
317349/// Called when falling off the end of a switch and the type can be represented
318350/// as a raw value.
319351///
0 commit comments