Commit Graph

2 Commits

Author SHA1 Message Date
Becca Royal-Gordon
85ea884a64 Make @_cdecl @implementation support __asm__
When @_objcImplementation is used to implement a C function marked with __asm__, take the attribute into account when mangling SIL references.

In theory this change should also make `clang::OverloadableAttr` functions mangle correctly, but in practice the matching logic for @_cdecl @_objcImplementation doesn’t currently support overloadable functions (and it’s not wise to try anyway, since clang doesn’t promise that their ABI won’t change).

Fixes rdar://120503717.
2024-01-04 18:25:07 -08:00
Becca Royal-Gordon
ba1ec90419 Generate IR for @_objcImpls
This commit begins to generate correct metadata for @_objcImplementation extensions:

• Swift-specific metadata and symbols are not generated.
• For main-class @_objcImpls, we visit the class to emit metadata, but visit the extension’s members.
• Includes both IR tests and executable tests, including coverage of same-module @objc subclasses, different-module @objc subclasses, and clang subclasses.

The test cases do not yet cover stored properties.
2022-10-18 17:21:56 -07:00