File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -3959,10 +3959,18 @@ namespace {
39593959
39603960 void addDestructorFunction () {
39613961 if (IGM.Context .LangOpts .hasFeature (Feature::Embedded)) {
3962- auto dtorRef = SILDeclRef (Target->getDestructor (), SILDeclRef::Kind::Deallocator);
3963- addReifiedVTableEntry (dtorRef);
3962+ auto dtorRef =
3963+ SILDeclRef (Target->getDestructor (), SILDeclRef::Kind::Deallocator);
3964+ auto entry = VTable->getEntry (IGM.getSILModule (), dtorRef);
3965+ if (llvm::Constant *ptr = IGM.getAddrOfSILFunction (
3966+ entry->getImplementation (), NotForDefinition)) {
3967+ B.addSignedPointer (ptr, IGM.getOptions ().PointerAuth .HeapDestructors ,
3968+ PointerAuthEntity::Special::HeapDestructor);
3969+ } else {
3970+ B.addNullPointer (IGM.FunctionPtrTy );
3971+ }
39643972 return ;
3965- }
3973+ }
39663974
39673975 if (asImpl ().getFieldLayout ().hasObjCImplementation ())
39683976 return ;
You can’t perform that action at this time.
0 commit comments