We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7af65d9 commit 6920290Copy full SHA for 6920290
lib/SILGen/ManagedValue.h
@@ -76,6 +76,10 @@ class ManagedValue {
76
ManagedValue(SILValue value, CleanupHandle cleanup)
77
: valueAndFlag(value, false), cleanup(cleanup) {
78
assert(value && "No value specified?!");
79
+ assert((!getType().isObject() ||
80
+ value.getOwnershipKind() != ValueOwnershipKind::Trivial ||
81
+ !hasCleanup()) &&
82
+ "Objects with trivial ownership should never have a cleanup");
83
}
84
85
/// Create a managed value for a +0 rvalue.
0 commit comments