@@ -83,12 +83,10 @@ static Size getCoroutineContextSize(IRGenModule &IGM,
83
83
case SILCoroutineKind::None:
84
84
llvm_unreachable (" expand a coroutine" );
85
85
case SILCoroutineKind::YieldOnce2:
86
- if (IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce ) {
87
- LLVM_FALLTHROUGH;
88
- } else {
86
+ if (!IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce )
89
87
llvm::report_fatal_error (
90
88
" callee allocated coroutines do not have fixed-size buffers" );
91
- }
89
+ LLVM_FALLTHROUGH;
92
90
case SILCoroutineKind::YieldOnce:
93
91
return getYieldOnceCoroutineBufferSize (IGM);
94
92
case SILCoroutineKind::YieldMany:
@@ -1912,11 +1910,9 @@ void SignatureExpansion::expandParameters(
1912
1910
case SILCoroutineKind::None:
1913
1911
break ;
1914
1912
case SILCoroutineKind::YieldOnce2:
1915
- if (IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce ) {
1916
- LLVM_FALLTHROUGH;
1917
- } else {
1913
+ if (!IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce )
1918
1914
break ;
1919
- }
1915
+ LLVM_FALLTHROUGH;
1920
1916
1921
1917
case SILCoroutineKind::YieldOnce:
1922
1918
case SILCoroutineKind::YieldMany:
@@ -2720,12 +2716,9 @@ class SyncCallEmission final : public CallEmission {
2720
2716
// Pass along the coroutine buffer.
2721
2717
switch (origCalleeType->getCoroutineKind ()) {
2722
2718
case SILCoroutineKind::YieldOnce2:
2723
- if (IGF.IGM .IRGen .Opts .EmitYieldOnce2AsYieldOnce ) {
2724
- LLVM_FALLTHROUGH;
2725
- } else {
2719
+ if (!IGF.IGM .IRGen .Opts .EmitYieldOnce2AsYieldOnce )
2726
2720
llvm::report_fatal_error (" unimplemented" );
2727
- break ;
2728
- }
2721
+ LLVM_FALLTHROUGH;
2729
2722
case SILCoroutineKind::YieldOnce:
2730
2723
case SILCoroutineKind::YieldMany:
2731
2724
original.transferInto (adjusted, 1 );
@@ -4810,12 +4803,10 @@ irgen::getCoroutineResumeFunctionPointerAuth(IRGenModule &IGM,
4810
4803
return { IGM.getOptions ().PointerAuth .YieldManyResumeFunctions ,
4811
4804
PointerAuthEntity::forYieldTypes (fnType) };
4812
4805
case SILCoroutineKind::YieldOnce2:
4813
- if (IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce ) {
4814
- LLVM_FALLTHROUGH;
4815
- } else {
4806
+ if (!IGM.IRGen .Opts .EmitYieldOnce2AsYieldOnce )
4816
4807
return {IGM.getOptions ().PointerAuth .YieldOnce2ResumeFunctions ,
4817
4808
PointerAuthEntity::forYieldTypes (fnType)};
4818
- }
4809
+ LLVM_FALLTHROUGH;
4819
4810
case SILCoroutineKind::YieldOnce:
4820
4811
return { IGM.getOptions ().PointerAuth .YieldOnceResumeFunctions ,
4821
4812
PointerAuthEntity::forYieldTypes (fnType) };
0 commit comments