Skip to content

[pull] swiftwasm from main #2924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 60 commits into from
Apr 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
67bcb66
[IRGen] Fix missing musttail call for dynamic functions.
varungandhi-apple Mar 30, 2021
871efc7
[Runtime] Use swiftasync + tail calls correctly in runtime unittests.
varungandhi-apple Mar 30, 2021
49eddbf
[stdlib] Fix bug in small string uninitialized init
milseman Mar 31, 2021
ec7258e
[stdlib] Fix incorrect Float16 extension
lorentey Mar 31, 2021
64f6182
prevent double `@MainActor` annotation in ClangImporter
kavon Mar 30, 2021
ae8efa3
[TypeChecker] NFC: Add a couple of tests for inference with optional/…
xedin Apr 1, 2021
c834520
[simplify-instruction] When eliminating extracts from an aggregate we…
gottesmm Mar 31, 2021
2a4cc91
[Property Wrappers] Fix accessor synthesis of wrapped parameters that…
hborla Apr 1, 2021
47ee771
[testing] Add missing `REQUIRES: concurrency`
davezarzycki Apr 1, 2021
02f27c0
[SourceKit/CursorInfo] Enable passing .swiftsourceinfo test
bnbarham Apr 1, 2021
f3f2ea6
AST: Skip requirement checks in IsBindableVisitor::visitBoundGenericT…
slavapestov Apr 1, 2021
6e63486
AST: Remove a couple of bogus isInvalid() checks
slavapestov Apr 1, 2021
5ecb9eb
[Actors] Permit non-sendable, escaping closures to be actor-isolated.
DougGregor Apr 1, 2021
cb67f45
[stdlib] Float16: Add explicit Sendable conformance to work around sw…
lorentey Apr 1, 2021
7ae0b1d
IRGen: Create full async functions for partial apply forwarders
aschwaighofer Apr 1, 2021
8e1d25b
IRGen: Fix async throw emission for indirect direct values
aschwaighofer Apr 1, 2021
1173b73
[Concurrency] Add availability to Concurrency APIs.
mikeash Mar 31, 2021
e26ada5
[TypeChecker] NFC: Add an additional test-case for rdar://46713933 wi…
xedin Apr 1, 2021
6d2fc9e
Add @availability to some concurrency tests that were missing it.
mikeash Apr 1, 2021
4c1d4a0
[build-wrangler] Disable broken test.
gottesmm Apr 1, 2021
08c5507
Merge pull request #36710 from gottesmm/pr-bd8f4e5d5c59ddedf4ee802388…
gottesmm Apr 1, 2021
70a13aa
Merge pull request #36661 from varungandhi-apple/vg-main
varungandhi-apple Apr 1, 2021
85e3c7b
Merge pull request #36696 from hborla/wrapped-parameter-accessor-synt…
hborla Apr 2, 2021
435f0de
Merge pull request #36701 from aschwaighofer/rdar_76009728
aschwaighofer Apr 2, 2021
3de7f6f
Merge pull request #36700 from aschwaighofer/async_partial_apply_forw…
aschwaighofer Apr 2, 2021
5319a1a
Merge pull request #36693 from davezarzycki/pr36693
davezarzycki Apr 2, 2021
1d28287
[CodeCompletion] Migrate some tests to batch completion test
rintaro Apr 2, 2021
8bb3ab0
Merge pull request #36695 from bnbarham/enable-passing-test
bnbarham Apr 2, 2021
a5ecf8c
Merge pull request #36702 from mikeash/concurrency-availability
DougGregor Apr 2, 2021
6e84c01
[CodeCompletion] Migrate some tests to batch completion test
rintaro Apr 2, 2021
defb593
[CodeCompletion] Migrate some tests to batch completion test
rintaro Apr 2, 2021
f3d1c34
StringOptimization: don't constant fold dynamic Self type names.
eeckstein Apr 2, 2021
f8cb209
Only diagnose references to globals under -warn-concurrency.
DougGregor Apr 2, 2021
ac88ce5
Merge pull request #36655 from kavon/double-double-mainactor-style
swift-ci Apr 2, 2021
26a4d5c
Merge pull request #36706 from xedin/rdar46713933-literals
xedin Apr 2, 2021
ce135e6
Merge pull request #36691 from xedin/a-couple-of-tests
xedin Apr 2, 2021
63d0b73
Merge pull request #36669 from lorentey/fix-float16-sendable
lorentey Apr 2, 2021
fe29da2
IRGen: Fix signing of resumeParent in emitGetAsyncContinuation
aschwaighofer Apr 2, 2021
c5b7208
Merge pull request #36718 from DougGregor/limit-global-var-diagnose
DougGregor Apr 2, 2021
ab47660
allow ObjC methods with completion handlers be imported as effectful …
kavon Mar 29, 2021
f5551f3
Add ObjC interface test for effectful property imports
kavon Apr 2, 2021
3041694
add SILGen test of ObjC effectful property imports
kavon Apr 2, 2021
1586ca8
add execution test for ObjC-imported effectful properties
kavon Apr 2, 2021
876a0ee
Merge pull request #36714 from rintaro/ide-completion-batchtest1
rintaro Apr 2, 2021
a201885
Fix test
DougGregor Apr 2, 2021
3c13da1
[build-wrangler] Unblock CI by disabling a test that is waiting on an…
gottesmm Apr 2, 2021
0f8c3da
Merge pull request #36724 from gottesmm/pr-fd0f3b90723625507515032bea…
gottesmm Apr 2, 2021
3028548
Merge pull request #36719 from aschwaighofer/resume_parent_emitGetAsy…
aschwaighofer Apr 2, 2021
ca16fba
[swift-api-extract] BumpPtrAllocate API structs
cachemeifyoucan Apr 2, 2021
9ef00cf
Merge pull request #36715 from rintaro/ide-completion-batchtest2
rintaro Apr 2, 2021
10b4e7a
Merge pull request #36684 from gottesmm/pr-415ff46ebe84945d134a5e0511…
gottesmm Apr 2, 2021
b810bb7
[CodeCompletion] Migrate some tests to batch completion test
rintaro Apr 2, 2021
04e4d97
Merge pull request #36670 from kavon/objc-effectful-properties
kavon Apr 2, 2021
1ab4511
Merge pull request #36697 from slavapestov/unsubstitutable-sil-functi…
slavapestov Apr 2, 2021
d3d2d75
Merge pull request #36698 from DougGregor/actor-escaping-isolation
DougGregor Apr 2, 2021
d674617
Merge pull request #36717 from eeckstein/main
swift-ci Apr 2, 2021
d8d4fc9
Merge pull request #36716 from rintaro/ide-completion-batchtest3
rintaro Apr 2, 2021
f6cd99e
Merge pull request #36725 from rintaro/ide-completion-batchtest4
rintaro Apr 2, 2021
f495c02
Merge pull request #36667 from milseman/small_differential
milseman Apr 2, 2021
717a132
Merge pull request #36727 from cachemeifyoucan/eng/PR-76155450
cachemeifyoucan Apr 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/swift/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ class ASTContext final {
/// compiler for the target platform.
AvailabilityContext getSwift54Availability();

/// Get the runtime availability of features introduced in the Swift 5.5
/// compiler for the target platform.
AvailabilityContext getSwift55Availability();

/// Get the runtime availability of features that have been introduced in the
/// Swift compiler for future versions of the target platform.
AvailabilityContext getSwiftFutureAvailability();
Expand Down
4 changes: 4 additions & 0 deletions include/swift/AST/DiagnosticsClangImporter.def
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,9 @@ WARNING(implicit_bridging_header_imported_from_module,none,
"is deprecated and will be removed in a later version of Swift",
(StringRef, Identifier))

WARNING(import_multiple_mainactor_attr,none,
"this attribute for global actor '%0' is invalid; the declaration already has attribute for global actor '%1'",
(StringRef, StringRef))

#define UNDEFINE_DIAGNOSTIC_MACROS
#include "DefineDiagnosticMacros.h"
3 changes: 0 additions & 3 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -4394,9 +4394,6 @@ ERROR(actor_isolated_from_concurrent_function,none,
ERROR(actor_isolated_from_async_let,none,
"actor-isolated %0 %1 cannot be %select{referenced|mutated|used 'inout'}2 from 'async let' initializer",
(DescriptiveDeclKind, DeclName, unsigned))
ERROR(actor_isolated_from_escaping_closure,none,
"actor-isolated %0 %1 cannot be %select{referenced|mutated|used 'inout'}2 from an '@escaping' closure",
(DescriptiveDeclKind, DeclName, unsigned))
ERROR(actor_isolated_keypath_component,none,
"cannot form key path to actor-isolated %0 %1",
(DescriptiveDeclKind, DeclName))
Expand Down
7 changes: 6 additions & 1 deletion lib/AST/Availability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ ASTContext::getIntermodulePrespecializedGenericMetadataAvailability() {
}

AvailabilityContext ASTContext::getConcurrencyAvailability() {
return getSwiftFutureAvailability();
return getSwift55Availability();
}

AvailabilityContext ASTContext::getDifferentiationAvailability() {
Expand Down Expand Up @@ -409,6 +409,11 @@ AvailabilityContext ASTContext::getSwift54Availability() {
}
}

AvailabilityContext ASTContext::getSwift55Availability() {
return getSwiftFutureAvailability();
}


AvailabilityContext ASTContext::getSwiftFutureAvailability() {
auto target = LangOpts.Target;

Expand Down
11 changes: 6 additions & 5 deletions lib/AST/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1834,9 +1834,6 @@ class IsBindableVisitor
if (nom->getDecl() != substNom->getDecl())
return CanType();

if (nom->getDecl()->isInvalid())
return CanType();

// Same decl should always either have or not have a parent.
assert((bool)nom->getParent() == (bool)substNom->getParent());

Expand Down Expand Up @@ -2078,8 +2075,6 @@ class IsBindableVisitor
return CanType();

auto *decl = bgt->getDecl();
if (decl->isInvalid())
return CanType();

auto *moduleDecl = decl->getParentModule();
auto origSubMap = bgt->getContextSubstitutionMap(
Expand Down Expand Up @@ -2139,6 +2134,12 @@ class IsBindableVisitor
if (req.getKind() != RequirementKind::Conformance) continue;

auto canTy = req.getFirstType()->getCanonicalType();

// If the substituted type is an interface type, we can't verify the
// generic requirements.
if (canTy.subst(substSubMap)->isTypeParameter())
continue;

auto *proto = req.getProtocolDecl();
auto origConf = origSubMap.lookupConformance(canTy, proto);
auto substConf = substSubMap.lookupConformance(canTy, proto);
Expand Down
133 changes: 124 additions & 9 deletions lib/ClangImporter/ImportDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4590,7 +4590,27 @@ namespace {
if (auto Known = Impl.importDeclCached(decl, getVersion()))
return Known;

return importObjCMethodDecl(decl, dc, None);
ImportedName importedName;
Optional<ImportedName> correctSwiftName; // TODO: not sure if we need this.
importedName = importFullName(decl, correctSwiftName);
if (!importedName)
return nullptr;

// some ObjC method decls are imported as computed properties.
switch(importedName.getAccessorKind()) {
case ImportedAccessorKind::PropertyGetter:
if (importedName.getAsyncInfo())
return importObjCMethodAsEffectfulProp(decl, dc, importedName);

// if there is no valid async info, then fall-back to method import.
LLVM_FALLTHROUGH;

case ImportedAccessorKind::PropertySetter:
case ImportedAccessorKind::SubscriptGetter:
case ImportedAccessorKind::SubscriptSetter:
case ImportedAccessorKind::None:
return importObjCMethodDecl(decl, dc, None);
}
}

/// Check whether we have already imported a method with the given
Expand Down Expand Up @@ -4666,6 +4686,78 @@ namespace {
return (accessor && accessor->getAccessorKind() == accessorInfo->Kind);
}

/// Creates a fresh VarDecl with a single 'get' accessor to represent
/// an ObjC method that takes no arguments other than a completion-handler
/// (where the handler may have an NSError argument).
Decl *importObjCMethodAsEffectfulProp(const clang::ObjCMethodDecl *decl,
DeclContext *dc,
ImportedName name) {
assert(name.getAsyncInfo() && "expected to be for an effectful prop!");

if (name.getAccessorKind() != ImportedAccessorKind::PropertyGetter) {
assert(false && "unexpected accessor kind as a computed prop");
// NOTE: to handle setters, we would need to search for an existing
// VarDecl corresponding to the one we might have already created
// for the 'get' accessor, and tack this accessor onto it.
return nullptr;
}

auto importedType = Impl.importEffectfulPropertyType(decl, dc, name,
isInSystemModule(dc));
if (!importedType)
return nullptr;

auto type = importedType.getType();
const auto access = getOverridableAccessLevel(dc);
auto ident = name.getDeclName().getBaseIdentifier();
auto propDecl = Impl.createDeclWithClangNode<VarDecl>(decl, access,
/*IsStatic*/decl->isClassMethod(), VarDecl::Introducer::Var,
Impl.importSourceLoc(decl->getLocation()), ident, dc);
propDecl->setInterfaceType(type);
Impl.recordImplicitUnwrapForDecl(propDecl,
importedType.isImplicitlyUnwrapped());

////
// Build the getter
AccessorInfo info{propDecl, AccessorKind::Get};
auto *getter = cast_or_null<AccessorDecl>(
importObjCMethodDecl(decl, dc, info));
if (!getter)
return nullptr;

Impl.importAttributes(decl, getter);

////
// Combine the getter and the VarDecl into a computed property.

// NOTE: since it's an ObjC method we're turning into a Swift computed
// property, we infer that it has no ObjC 'atomic' guarantees.
auto inferredObjCPropertyAttrs =
static_cast<clang::ObjCPropertyAttribute::Kind>
( clang::ObjCPropertyAttribute::Kind::kind_readonly
| clang::ObjCPropertyAttribute::Kind::kind_nonatomic
| (decl->isInstanceMethod()
? clang::ObjCPropertyAttribute::Kind::kind_class
: clang::ObjCPropertyAttribute::Kind::kind_noattr)
);

// FIXME: Fake locations for '{' and '}'?
propDecl->setIsSetterMutating(false);
makeComputed(propDecl, getter, /*setter=*/nullptr);
addObjCAttribute(propDecl, Impl.importIdentifier(decl->getIdentifier()));
applyPropertyOwnership(propDecl, inferredObjCPropertyAttrs);

////
// Check correctness

if (getter->getParameters()->size() != 0) {
assert(false && "this should not happen!");
return nullptr;
}

return propDecl;
}

Decl *importObjCMethodDecl(const clang::ObjCMethodDecl *decl,
DeclContext *dc,
bool forceClassMethod,
Expand Down Expand Up @@ -4797,11 +4889,16 @@ namespace {
prop = nullptr;
}

// If we have an accessor-import request but didn't find a property,
// reject the import request.
if (accessorInfo && !prop) {
const bool nameImportIsGetter =
importedName.getAccessorKind() == ImportedAccessorKind::PropertyGetter;

const bool needAccessorDecl = prop || nameImportIsGetter;

// If we have an accessor-import request, but didn't find a property
// or it's ImportedName doesn't indicate a getter,
// then reject the import request.
if (accessorInfo && !needAccessorDecl)
return nullptr;
}

// Import the parameter list and result type.
ParameterList *bodyParams = nullptr;
Expand Down Expand Up @@ -4854,7 +4951,7 @@ namespace {

// If the method has a related result type that is representable
// in Swift as DynamicSelf, do so.
if (!prop && decl->hasRelatedResultType()) {
if (!needAccessorDecl && decl->hasRelatedResultType()) {
resultTy = dc->getSelfInterfaceType();
if (dc->getSelfClassDecl())
resultTy = DynamicSelfType::get(resultTy, Impl.SwiftContext);
Expand Down Expand Up @@ -5020,7 +5117,7 @@ namespace {
FuncDecl *setter);

/// Import the accessor and its attributes.
AccessorDecl *importAccessor(clang::ObjCMethodDecl *clangAccessor,
AccessorDecl *importAccessor(const clang::ObjCMethodDecl *clangAccessor,
AbstractStorageDecl *storage,
AccessorKind accessorKind,
DeclContext *dc);
Expand Down Expand Up @@ -7389,7 +7486,7 @@ SwiftDeclConverter::importSubscript(Decl *decl,
}

AccessorDecl *
SwiftDeclConverter::importAccessor(clang::ObjCMethodDecl *clangAccessor,
SwiftDeclConverter::importAccessor(const clang::ObjCMethodDecl *clangAccessor,
AbstractStorageDecl *storage,
AccessorKind accessorKind,
DeclContext *dc) {
Expand Down Expand Up @@ -8353,6 +8450,7 @@ void ClangImporter::Implementation::importAttributes(
// Scan through Clang attributes and map them onto Swift
// equivalents.
PatternBindingInitializer *initContext = nullptr;
Optional<const clang::SwiftAttrAttr *> SeenMainActorAttr;
bool AnyUnavailable = MappedDecl->getAttrs().isUnavailable(C);
for (clang::NamedDecl::attr_iterator AI = ClangDecl->attr_begin(),
AE = ClangDecl->attr_end(); AI != AE; ++AI) {
Expand Down Expand Up @@ -8496,15 +8594,32 @@ void ClangImporter::Implementation::importAttributes(
// __attribute__((swift_attr("attribute")))
//
if (auto swiftAttr = dyn_cast<clang::SwiftAttrAttr>(*AI)) {
// FIXME: Hard-core @MainActor and @UIActor, because we don't have a
// FIXME: Hard-code @MainActor and @UIActor, because we don't have a
// point at which to do name lookup for imported entities.
if (auto isMainActor = isMainActorAttr(SwiftContext, swiftAttr)) {
bool isUnsafe = *isMainActor;

if (SeenMainActorAttr) {
// Cannot add main actor annotation twice. We'll keep the first
// one and raise a warning about the duplicate.
auto &clangSrcMgr = getClangASTContext().getSourceManager();
ClangSourceBufferImporter &bufferImporter =
getBufferImporterForDiagnostics();
SourceLoc attrLoc = bufferImporter.resolveSourceLocation(
clangSrcMgr, swiftAttr->getLocation());

diagnose(attrLoc, diag::import_multiple_mainactor_attr,
swiftAttr->getAttribute(),
SeenMainActorAttr.getValue()->getAttribute());
continue;
}

if (Type mainActorType = SwiftContext.getMainActorType()) {
auto typeExpr = TypeExpr::createImplicit(mainActorType, SwiftContext);
auto attr = CustomAttr::create(SwiftContext, SourceLoc(), typeExpr);
attr->setArgIsUnsafe(isUnsafe);
MappedDecl->getAttrs().add(attr);
SeenMainActorAttr = swiftAttr;
}

continue;
Expand Down
8 changes: 6 additions & 2 deletions lib/ClangImporter/ImportName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,12 @@ ImportedName NameImporter::importNameImpl(const clang::NamedDecl *D,
else if (parsedName.IsSetter)
result.info.accessorKind = ImportedAccessorKind::PropertySetter;

if (method && parsedName.IsFunctionName &&
result.info.accessorKind == ImportedAccessorKind::None) {
// only allow effectful property imports if through `swift_async_name`
const bool effectfulProperty = parsedName.IsGetter && nameAttr->isAsync
&& swiftCtx.LangOpts.EnableExperimentalConcurrency;

// Consider throws and async imports.
if (method && (parsedName.IsFunctionName || effectfulProperty)) {
// Get the parameters.
ArrayRef<const clang::ParmVarDecl *> params{method->param_begin(),
method->param_end()};
Expand Down
43 changes: 43 additions & 0 deletions lib/ClangImporter/ImportType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,49 @@ static Type decomposeCompletionHandlerType(
}
}

ImportedType ClangImporter::Implementation::importEffectfulPropertyType(
const clang::ObjCMethodDecl *decl,
DeclContext *dc,
importer::ImportedName name,
bool isFromSystemModule) {
// here we expect a method that is being imported as an effectful property.
// thus, we currently require async info.
if (!name.getAsyncInfo())
return ImportedType();

// a variadic method doesn't make sense here
if (decl->isVariadic())
return ImportedType();

// Our strategy here is to determine what the return type of the method would
// be, had we imported it as a method.

Optional<ForeignAsyncConvention> asyncConvention;
Optional<ForeignErrorConvention> errorConvention;

const auto kind = SpecialMethodKind::Regular;

// Import the parameter list and result type.
ParameterList *bodyParams = nullptr;
ImportedType importedType;

auto methodReturnType = importMethodParamsAndReturnType(
dc, decl, decl->parameters(), false,
isFromSystemModule, &bodyParams, name,
asyncConvention, errorConvention, kind);

// getter mustn't have any parameters!
if (bodyParams->size() != 0) {
return ImportedType();
}

// We expect that the method, after import, will have only an async convention
if (!asyncConvention || errorConvention)
return ImportedType();

return methodReturnType;
}

ImportedType ClangImporter::Implementation::importMethodParamsAndReturnType(
const DeclContext *dc, const clang::ObjCMethodDecl *clangDecl,
ArrayRef<const clang::ParmVarDecl *> params, bool isVariadic,
Expand Down
7 changes: 7 additions & 0 deletions lib/ClangImporter/ImporterImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,13 @@ class LLVM_LIBRARY_VISIBILITY ClangImporter::Implementation
ImportedType importPropertyType(const clang::ObjCPropertyDecl *clangDecl,
bool isFromSystemModule);

/// Determines what the type of an effectful, computed read-only property
/// would be, if the given method were imported as such a property.
ImportedType importEffectfulPropertyType(const clang::ObjCMethodDecl *decl,
DeclContext *dc,
importer::ImportedName name,
bool isFromSystemModule);

/// Attempt to infer a default argument for a parameter with the
/// given Clang \c type, \c baseName, and optionality.
static DefaultArgumentKind
Expand Down
13 changes: 7 additions & 6 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4803,12 +4803,13 @@ void irgen::emitAsyncReturn(IRGenFunction &IGF, AsyncContextLayout &asyncLayout,
auto &nativeSchema =
IGM.getTypeInfo(funcResultTypeInContext).nativeReturnValueSchema(IGM);
if (result.empty() && !nativeSchema.empty()) {
// When we throw, we set the return values to undef.
nativeSchema.enumerateComponents([&](clang::CharUnits begin,
clang::CharUnits end,
llvm::Type *componentTy) {
nativeResultsStorage.push_back(llvm::UndefValue::get(componentTy));
});
if (!nativeSchema.requiresIndirect())
// When we throw, we set the return values to undef.
nativeSchema.enumerateComponents([&](clang::CharUnits begin,
clang::CharUnits end,
llvm::Type *componentTy) {
nativeResultsStorage.push_back(llvm::UndefValue::get(componentTy));
});
if (!error.empty())
nativeResultsStorage.push_back(error.claimNext());
nativeResults = nativeResultsStorage;
Expand Down
7 changes: 6 additions & 1 deletion lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2613,7 +2613,12 @@ void IRGenModule::createReplaceableProlog(IRGenFunction &IGF, SILFunction *f) {
FunctionPointer(silFunctionType, realReplFn, authInfo, signature)
.getAsFunction(IGF),
forwardedArgs);
Res->setTailCall();
if (Res->getCallingConv() == llvm::CallingConv::SwiftTail &&
Res->getCaller()->getCallingConv() == llvm::CallingConv::SwiftTail) {
Res->setTailCallKind(IGF.IGM.AsyncTailCallKind);
} else {
Res->setTailCall();
}
if (IGF.CurFn->getReturnType()->isVoidTy())
IGF.Builder.CreateRetVoid();
else
Expand Down
Loading