Skip to content
Merged
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
6 changes: 6 additions & 0 deletions lib/SIL/IR/SILModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,3 +953,9 @@ SourceLoc swift::extractNearestSourceLoc(const SILModule *M) {
return SourceLoc();
return extractNearestSourceLoc(M->getSwiftModule());
}

bool Lowering::usesObjCAllocator(ClassDecl *theClass) {
// If the root class was implemented in Objective-C, use Objective-C's
// allocation methods because they may have been overridden.
return theClass->getObjectModel() == ReferenceCounting::ObjC;
}
6 changes: 0 additions & 6 deletions lib/SILGen/SILGenConstructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,6 @@ void SILGenFunction::emitEnumConstructor(EnumElementDecl *element) {
}
}

bool Lowering::usesObjCAllocator(ClassDecl *theClass) {
// If the root class was implemented in Objective-C, use Objective-C's
// allocation methods because they may have been overridden.
return theClass->getObjectModel() == ReferenceCounting::ObjC;
}

void SILGenFunction::emitClassConstructorAllocator(ConstructorDecl *ctor) {
assert(!ctor->isFactoryInit() && "factories should not be emitted here");

Expand Down