Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 3 additions & 14 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <optional>

#include "CallEmission.h"
#include "ClassTypeInfo.h"
#include "EntryPointArgumentEmission.h"
#include "Explosion.h"
#include "GenCall.h"
Expand Down Expand Up @@ -2613,19 +2612,9 @@ class SyncCallEmission final : public CallEmission {
if (fnConv.getNumDirectSILResults() == 1
&& (fnConv.getDirectSILResults().begin()->getConvention()
== ResultConvention::Autoreleased)) {
if (IGF.IGM.Context.LangOpts.EnableObjCInterop) {
auto ty = fnConv.getSILResultType(IGF.IGM.getMaximalTypeExpansionContext());
// NOTE: We cannot dyn_cast directly to ClassTypeInfo since it does not
// implement 'classof', so will succeed for any ReferenceTypeInfo.
auto *refTypeInfo = dyn_cast<ReferenceTypeInfo>(&IGF.IGM.getTypeInfo(ty));
if (refTypeInfo &&
refTypeInfo->getReferenceCountingType() == ReferenceCounting::Custom) {
Explosion e(result);
refTypeInfo->as<ClassTypeInfo>().strongCustomRetain(IGF, e, true);
} else {
result = emitObjCRetainAutoreleasedReturnValue(IGF, result);
}
} else
if (IGF.IGM.Context.LangOpts.EnableObjCInterop)
result = emitObjCRetainAutoreleasedReturnValue(IGF, result);
else
IGF.emitNativeStrongRetain(result, IGF.getDefaultAtomicity());
}

Expand Down
6 changes: 0 additions & 6 deletions test/Interop/Cxx/foreign-reference/Inputs/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ module ReferenceCounted {
requires cplusplus
}

module ReferenceCountedObjCProperty {
header "reference-counted-objc-property.h"
requires cplusplus
export *
}

module MemberLayout {
header "member-layout.h"
requires cplusplus
Expand Down

This file was deleted.

This file was deleted.