Commit Graph

5 Commits

Author SHA1 Message Date
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Slava Pestov
641469e5b3 Sema: Don't consider if 'didSet' references 'oldValue' when computing if setter is mutable
Previously this would depend on whether the 'didSet' referenced
'oldValue'. This introduces a request cycle once parse-time name
lookup is disabled, and was also an ABI break from Swift 5.2.

See https://forums.swift.org/t/clarify-behavior-of-se-0268-with-a-mutating-getter/40324.
2020-09-15 22:03:58 -04:00
Holly Borla
b27b8cfb1f [Property Wrappers] Consider willSet mutability when deciding if a wrapped
property setter is mutating, and address other PR feedback
2020-04-17 17:45:04 -07:00
Holly Borla
37e4542b7c [Property Wrappers] For a property with an attached property wrapper,
consider its didSet mutability when computing setter mutability.
2020-04-16 17:13:35 -07:00
Suyash Srijan
4688f4de64 [Test] Add a SILGen test to make sure the observers are correctly called 2020-04-10 21:32:28 +01:00