Commit Graph

1 Commits

Author SHA1 Message Date
Nuri Amari
87b3127697 [swift-vfe] Disable for @objc classes
Swift methods can be called from Objective-C without a vtable
load, and more importantly without emitting an `llvm.type.checked.load`
instruction. These are effectively virtual callsites that are not
visible to the VFE logic in GlobalDCE.

To to safely enable swift-vfe we must prevent vtables whose functions
are callable from Objective-C from being eliminated.

To do this we ensure such vtables have public vcall_visibility, which
indirectly prevents GlobalDCE from stripping them.
2023-10-26 11:37:10 -07:00