File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -590,7 +590,7 @@ class IRGenOptions {
590
590
DisableReadonlyStaticObjects(false ), CollocatedMetadataFunctions(false ),
591
591
ColocateTypeDescriptors(true ), UseRelativeProtocolWitnessTables(false ),
592
592
UseFragileResilientProtocolWitnesses(false ), EnableHotColdSplit(false ),
593
- EmitAsyncFramePushPopMetadata(false ), EmitYieldOnce2AsYieldOnce(true ),
593
+ EmitAsyncFramePushPopMetadata(true ), EmitYieldOnce2AsYieldOnce(true ),
594
594
AsyncFramePointerAll(false ), UseProfilingMarkerThunks(false ),
595
595
DebugInfoForProfiling(false ), CmdArgs(),
596
596
SanitizeCoverage(llvm::SanitizerCoverageOptions()),
Original file line number Diff line number Diff line change @@ -2605,7 +2605,8 @@ void IRGenSILFunction::emitSILFunction() {
2605
2605
LinkEntity::forSILFunction (CurSILFn),
2606
2606
getAsyncContextLayout (*this ).getSize ());
2607
2607
2608
- if (IGM.getOptions ().EmitAsyncFramePushPopMetadata ) {
2608
+ if (IGM.getOptions ().EmitAsyncFramePushPopMetadata &&
2609
+ IGM.TargetInfo .OutputObjectFormat == llvm::Triple::MachO) {
2609
2610
CurFn->addFnAttr (" async_entry" );
2610
2611
CurFn->addFnAttr (llvm::Attribute::NoInline);
2611
2612
}
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name async -target %target-swift-5.1-abi-triple -enable-async-frame-push-pop-metadata | %FileCheck %s --check-prefix=ENABLED
2
2
// RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name async -target %target-swift-5.1-abi-triple -O -enable-async-frame-push-pop-metadata | %FileCheck %s --check-prefix=ENABLED
3
3
// RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name async -target %target-swift-5.1-abi-triple -disable-async-frame-push-pop-metadata | %FileCheck %s --check-prefix=DISABLED
4
- // RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name async -target %target-swift-5.1-abi-triple | %FileCheck %s --check-prefix=DISABLED
4
+ // RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name async -target %target-swift-5.1-abi-triple | %FileCheck %s --check-prefix=ENABLED
5
5
6
6
// REQUIRES: OS=macosx || OS=iphoneos
7
7
// REQUIRES: PTRSIZE=64
You can’t perform that action at this time.
0 commit comments