mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #73611 from eeckstein/fix-store-runtime-effects
SIL: fix runtime effects of initializing store
This commit is contained in:
@@ -781,9 +781,8 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
|
||||
switch (cast<StoreInst>(inst)->getOwnershipQualifier()) {
|
||||
case StoreOwnershipQualifier::Unqualified:
|
||||
case StoreOwnershipQualifier::Trivial:
|
||||
return RuntimeEffect::NoEffect;
|
||||
case StoreOwnershipQualifier::Init:
|
||||
return RuntimeEffect::RefCounting;
|
||||
return RuntimeEffect::NoEffect;
|
||||
case StoreOwnershipQualifier::Assign:
|
||||
return RuntimeEffect::Releasing;
|
||||
}
|
||||
|
||||
@@ -505,3 +505,12 @@ func testLargeTuple() {
|
||||
_ = GenericStruct<SixInt8s>()
|
||||
}
|
||||
|
||||
struct NonCopyableStruct: ~Copyable {
|
||||
func foo() {}
|
||||
}
|
||||
|
||||
@_noLocks
|
||||
func testNonCopyable() {
|
||||
let t = NonCopyableStruct()
|
||||
t.foo()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user