Commit Graph

10 Commits

Author SHA1 Message Date
Anthony Latsis
a84dfc8387 [Gardening] Fix some set but not used variables 2025-01-30 21:34:38 +00:00
Kuba Mracek
6f4ae28520 [ASTMangler] Pass ASTContext to all instantiations of ASTMangler 2024-12-02 15:01:04 -08:00
Allan Shortlidge
d70091f5a1 IRGen: Omit property descriptors from #_hasSymbol checks for static properties.
Property descriptors for static properties were only recently introduced with
SE-438. Since these symbols are not present in Swift libraries that were
compiled with earlier versions of the compiler, it is not safe for
`#_hasSymbol` to check for the property descriptor symbols, since they can be
absent at either link time or runtime.

Resolves rdar://139749275.
2024-11-13 16:00:56 -08:00
Alejandro Alonso
c58cc440f0 Support generic but concrete metatypes with hasSymbol 2024-10-22 13:25:47 -07:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Ben Barham
1d3b5f40a0 [rebranch] Finish off memory effects change
`ReadOnly`/`ArgMemOnly` were mostly moved over, but a few were missed.
Update them all. Also default to `unknown` for no memory effects rather
than none (ie. we should be conservative).
2023-08-01 15:29:40 -07:00
Allan Shortlidge
2e8857d867 IRGen: Add #_hasSymbol support for clang function decls and ObjC classes.
Resolves rdar://103408651.
2022-12-22 10:55:30 -05:00
Allan Shortlidge
5c13523216 IRGen: Generate #_hasSymbol helpers for dynamic and @_dynamicReplacement(for:) functions.
Resolves rdar://103404707
2022-12-19 14:22:10 -05:00
Allan Shortlidge
ae32b8e148 IRGen: Implement lowering of has_symbol SIL instruction. 2022-11-16 16:07:29 -08:00
Allan Shortlidge
7f20380f0b IRGen: Generate #_hasSymbol query functions.
For each decl that needs a `#_hasSymbol()` query function, emit the corresponding helper function body during IRGen. Use `IRSymbolVisitor` to collect linkable symbols associated with the decl and return true from the helper function if the address of every associated symbol is non-null.

Resolves rdar://101884587
2022-11-04 11:19:29 -07:00