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 {
3959
3959
3960
3960
void addDestructorFunction () {
3961
3961
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
+ }
3964
3972
return ;
3965
- }
3973
+ }
3966
3974
3967
3975
if (asImpl ().getFieldLayout ().hasObjCImplementation ())
3968
3976
return ;
You can’t perform that action at this time.
0 commit comments