Landing: 6317befec95f

Project / Subsystem

gcc / objc

Date

2026-03-01

Author

Iain Sandoe

Commit

6317befec95f7829da7cb27870279d5d284e96f0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
objc
patch_id
commit_hash
6317befec95f7829da7cb27870279d5d284e96f0
source_type
github
headline
Objective-C,C++: Rework metadata generation
tldr
Improves Objective-C metadata generation by adding indices and type information.
author
Iain Sandoe
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • objective-c
  • metadata
  • lto
discussion_id_link
bugzilla_pr
date
2026-03-01T00:00:00.000Z

This commit refactors the generation of Objective-C metadata, which describes module properties to the runtime. The metadata, represented by CONSTRUCTORS, needs to be preserved even if seemingly unused during Link-Time Optimization (LTO), as the runtime actively uses it. Previously, these metadata CONSTRUCTORS lacked proper indices and typing. This change introduces a more robust mechanism for generating metadata objects with correct indices (numerical or structure member references) and appropriate data types. Internal APIs for metadata construction have also been renamed for clarity.