Commit Graph

3 Commits

Author SHA1 Message Date
Becca Royal-Gordon
9cffd4528d Fix objcImpl SILGen crash with initial value
The initial value expressions of stored properties in objcImpl classes were being incorrectly marked as serializable. As a result, the compiler would crash with a SIL verification failure if one of them called a non-public function or initializer.

Fix this problem by not marking these initial value expression functions as serializable. Code in other modules should not call them anyway, since they think of the class as a pure ObjC class.

Fixes rdar://114874429.
2024-07-23 16:17:30 -07:00
Becca Royal-Gordon
6d3e1ad794 Fix -target in several objcImpl tests 2024-04-30 12:03:46 -07:00
Allan Shortlidge
cf3031794f SILGen: Avoid expanding #line directives with invalid source locations.
Synthesized stub constructors contain `#line` directives and under certain
circumstances these directives can have invalid source locations. SILGen would
trigger an assert (or invoke UB in non-asserts builds) when attempting to
expand these directives into literal values. Check the source location for
validity before translating the location to a location in the outermost source
file.

Resolves rdar://121971741
2024-02-20 20:07:16 -08:00