swift
7d7c929e - [move-only] Teach the move only object checker how to handle concrete resilient guaranteed arguments.

Commit
2 years ago
[move-only] Teach the move only object checker how to handle concrete resilient guaranteed arguments. The only difference from normal concrete guaranteed parameter emission is we have a load_borrow on the argument before the copy_value. That is instead of: ``` bb0(%0 : @guaranteed $Type): %1 = copy_value %0 %2 = mark_must_check [no_consume_or_assign] %1 ``` we have, ``` bb0(%0 : $*Type): // in_guaranteed %1 = load_borrow %0 %2 = copy_value %1 %3 = mark_must_check [no_consume_or_assign] %2 ``` So I just needed to update the checker to recognize that pattern. This is tested by just making sure that the checker can handle the borrowVal in the tests without emitting an error. rdar://109170906
Author
Committer
Parents
Loading