swift
3ade98c8 - SILPrinter: add an option `-sil-print-ownership` to print the ownership of instruction results

Commit
16 days ago
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" ```
Author
Committer
Parents
Loading