mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILVerifier: verify that retain_value must not have a non-copyable operand
This commit is contained in:
@@ -3391,6 +3391,8 @@ public:
|
||||
void checkRetainValueInst(RetainValueInst *I) {
|
||||
require(I->getOperand()->getType().isObject(),
|
||||
"Source value should be an object value");
|
||||
require(!I->getOperand()->getType().isMoveOnly(),
|
||||
"retain value operand type must be copyable");
|
||||
require(!F.hasOwnership(),
|
||||
"retain_value is only in functions with unqualified ownership");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user