mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 09:16:38 +00:00

This mechanism is preferable in environments like embedded since it doesn't require special handling of the custom section. This is a reland of https://github.com/llvm/llvm-project/pull/114961 which addresses the issue reported by downstream users. Specifically, the two differences from the previous version are: * The internal `symbol##_impl__` symbol in the Mach-O implementation is annotated with `__attribute__((used))` to prevent LTO from deleting it which we've seen in the previous version. * `__is_function_overridden` is marked as `inline` so these symbols are placed in a COMDAT (or fully inlined) to avoid duplicate symbol errors which we've seen in the previous version.