Files
swift-mirror/test/SIL
Erik Eckstein 3ade98c84e SILPrinter: add an option -sil-print-ownership to print the ownership of instruction results
With this option the ownership of instruction results is printed in the comments at the end of the line, e.g.

```
  %3 = struct $S (%2, %1)                         // ownership: owned
```

And even without enabling this option, ownership comments are printed if the ownership of a result mismatches with its type.
That can happen e.g. for non-trivial enums which are constructed with a trivial case:

```
enum E {
  case A
  case B(AnyObject)
}

  %1 = enum $E, #E.A!enumelt  // type of %1 is non trivial, but ownership is "none"
```
2025-12-01 16:00:58 +01:00
..