[all-commits] [llvm/llvm-project] 923ddf: [ObjC] Check entire chain of superclasses to see i...

AtariDreams via All-commits all-commits at lists.llvm.org
Tue Mar 5 03:32:56 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 923ddf65f4e21ec67018cf56e823895de18d83bc
      https://github.com/llvm/llvm-project/commit/923ddf65f4e21ec67018cf56e823895de18d83bc
  Author: AtariDreams <83477269+AtariDreams at users.noreply.github.com>
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
    M clang/lib/CodeGen/CGObjCMac.cpp
    M clang/test/CodeGenObjC/constant-non-fragile-ivar-offset.m

  Log Message:
  -----------
  [ObjC] Check entire chain of superclasses to see if class layout is statically known (#81335)

As of now, we only check if a class directly inherits from NSObject to
determine if said class has fixed offsets and can therefore "opt-out"
from the non-fragile ABI for ivars.

However, if an NSObject subclass has fixed offsets, then so must the
subclasses of that subclass, so this allows us to optimize instances of
subclasses of subclasses that inherit from NSObject and so on.

To determine this, we need to find that the compiler can see the
implementation of each intermediate class, as that means it is
statically linked.

Fixes: #81369



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list