[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

David Chisnall via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 00:47:40 PST 2025


davidchisnall wrote:

How often does this appear in practice?  Normally, `NSObject` is implemented in a shared library and it is completely valid in a non-fragile ABI for a future version to have an extra ivar added (and, in the wild, we've seen people do this for extra state in debug builds).

I implemented this optimisation for the GNU runtime 15-20 years ago, but we stopped shipping it around ten or so years ago because the conditions that made it sound were triggered only if people statically linked the Foundation framework and did LTO, and that basically never happened.


https://github.com/llvm/llvm-project/pull/126591


More information about the cfe-commits mailing list