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 {
590590 DisableReadonlyStaticObjects(false ), CollocatedMetadataFunctions(false ),
591591 ColocateTypeDescriptors(true ), UseRelativeProtocolWitnessTables(false ),
592592 UseFragileResilientProtocolWitnesses(false ), EnableHotColdSplit(false ),
593- EmitAsyncFramePushPopMetadata(false ), EmitYieldOnce2AsYieldOnce(true ),
593+ EmitAsyncFramePushPopMetadata(true ), EmitYieldOnce2AsYieldOnce(true ),
594594 AsyncFramePointerAll(false ), UseProfilingMarkerThunks(false ),
595595 DebugInfoForProfiling(false ), CmdArgs(),
596596 SanitizeCoverage(llvm::SanitizerCoverageOptions()),
Original file line number Diff line number Diff line change @@ -2605,7 +2605,8 @@ void IRGenSILFunction::emitSILFunction() {
26052605 LinkEntity::forSILFunction (CurSILFn),
26062606 getAsyncContextLayout (*this ).getSize ());
26072607
2608- if (IGM.getOptions ().EmitAsyncFramePushPopMetadata ) {
2608+ if (IGM.getOptions ().EmitAsyncFramePushPopMetadata &&
2609+ IGM.TargetInfo .OutputObjectFormat == llvm::Triple::MachO) {
26092610 CurFn->addFnAttr (" async_entry" );
26102611 CurFn->addFnAttr (llvm::Attribute::NoInline);
26112612 }
Original file line number Diff line number Diff line change 11// 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
22// 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
33// 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
55
66// REQUIRES: OS=macosx || OS=iphoneos
77// REQUIRES: PTRSIZE=64
You can’t perform that action at this time.
0 commit comments