Commit Graph

3 Commits

Author SHA1 Message Date
Augusto Noronha
72b0120b43 [DebugInfo] Fix handling of @_originallyDefinedIn types
Emit an imported declaration for @_originallyDefinedIn under the
real module that these types live in.

This patch also changes the mangling for the debugger to respect
@_originallyDefinedIn, and fixes a bug where @_originallyDefinedIn
that should be ignored was still being used when mangling.

rdar://137146961
2024-12-16 10:28:18 -08:00
Augusto Noronha
f679a68e5d [DebugInfo] Fix tests to downstream "specification" attribute
The "specification_of" attribute in LLVM IR was renamed to
"specification". Adapt the  tests to the new name.
2024-11-14 13:17:58 -08:00
Augusto Noronha
da690d6153 [DebugInfo] Handle types with @_originallyDefinedIn in DebugInfo
When processing a nominal type that has the @_originallyDefinedIn attribute,
IRGenDebugInfo emits a forward declaration of the type as a child
of the original module, and the type with a specification pointing to
the forward declaration. We do this so LLDB has enough information to
both find the type in reflection metadata (the parent module name) and
find it in the swiftmodule (the module name in the type mangled name).

rdar://137146961
2024-10-29 17:46:45 -07:00