Skip to content

Commit 62a64d3

Browse files
committed
[region-isolation] Update for throw_addr.'
1 parent 45bb167 commit 62a64d3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,8 @@ CONSTANT_TRANSLATION(CondFailInst, Ignored)
24072407
CONSTANT_TRANSLATION(SwitchValueInst, Ignored)
24082408
CONSTANT_TRANSLATION(UnreachableInst, Ignored)
24092409
CONSTANT_TRANSLATION(UnwindInst, Ignored)
2410+
// Doesn't take a parameter.
2411+
CONSTANT_TRANSLATION(ThrowAddrInst, Ignored)
24102412

24112413
// Terminators that only need require.
24122414
CONSTANT_TRANSLATION(ReturnInst, Require)
@@ -2464,7 +2466,6 @@ CONSTANT_TRANSLATION(GetAsyncContinuationAddrInst, Unhandled)
24642466
CONSTANT_TRANSLATION(ExtractExecutorInst, Unhandled)
24652467
CONSTANT_TRANSLATION(BindMemoryInst, Unhandled)
24662468
CONSTANT_TRANSLATION(RebindMemoryInst, Unhandled)
2467-
CONSTANT_TRANSLATION(ThrowAddrInst, Unhandled)
24682469
CONSTANT_TRANSLATION(BeginUnpairedAccessInst, Unhandled)
24692470
CONSTANT_TRANSLATION(EndUnpairedAccessInst, Unhandled)
24702471

test/Concurrency/transfernonsendable_instruction_matching.sil

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,3 +1377,8 @@ bb0:
13771377
return %9999 : $()
13781378
}
13791379

1380+
sil [ossa] @throw_addr_test : $@convention(thin) @async <E where E : Error> (@in_guaranteed E) -> (@out NonSendableKlass, @error_indirect E) {
1381+
bb0(%result : $*NonSendableKlass, %result2 : $*E, %arg : $*E):
1382+
copy_addr %arg to [init] %result2 : $*E
1383+
throw_addr
1384+
}

0 commit comments

Comments
 (0)