Doug Gregor
020b69d4b6
[SE-0497] Implement @export attribute syntax
...
Implement the @export(implementation) and @export(interface) attributes
to replace @_alwaysEmitIntoClient and @_neverEmitIntoClient. Provide a
warning + Fix-It to start staging out the very-new
@_neverEmitIntoClient. We'll hold off on pushing folks toward
@_alwaysEmitIntoClient for a little longer.
2025-11-07 22:00:40 -08:00
Kuba (Brecka) Mracek
b6c29f1ce6
Merge pull request #85136 from kubamracek/section-top-level
...
SE-0492: Handle top-level `@section`-annotated globals
2025-11-04 11:15:50 -08:00
Kuba Mracek
ee623f8d59
Add @section/@const handling of globals to ASTGen too
2025-11-03 13:47:51 -08:00
Aidan Hall
a8cef4451a
Merge pull request #84513 from aidan-hall/pack-opt
...
Optimize Specializations of Variadic Generics by Eliminating Parameter Packs
2025-10-31 11:24:04 +00:00
Aidan Hall
c7af4c584e
Bridging: APIs for PackSpecialization pass
2025-10-26 13:44:34 +00:00
Becca Royal-Gordon
64d8b70942
Make DeclNameRef able to store a module selector
...
In this commit, this change affects certain diagnostics but doesn’t actually alter name lookup behavior yet.
2025-10-24 16:23:33 -07:00
Becca Royal-Gordon
683ce9d639
Update and test ASTGen for module selectors
2025-10-16 13:30:30 -07:00
Becca Royal-Gordon
c9bb85a875
[NFC] Add DeclNameLoc to specialize/dynamicReplacement
2025-10-16 13:30:28 -07:00
Hamish Knight
2b8a1cccfd
[AST] Store owning Decl/DeclContext on CustomAttr
...
Introduce CustomAttrOwner that can store either a Decl for an
attached attribute, or a DeclContext for e.g a type or closure
attribute. Store this on CustomAttr such that we can query it from
the name lookup requests.
2025-10-13 13:37:29 +01:00
Andrew Trick
0d496b5404
SwiftCompilerSources: bridge Type.unsafePointerElementType
2025-10-07 10:44:42 -07:00
Doug Gregor
3082b04b75
[Macros] Feed the static build configuration into macro expansions
...
Thread the static build configuration (formed from language options) in
to the macro plugin handler, which will serialize it for use in the
macro implementation. test this with a simple macro that checks
whether a particular custom configuration (set via `-D`) is enabled or
not.
This required some re-layering, sinking the logic for building a
StaticBuildConfiguration from language options down into a new
swiftBasicSwift library, which sits on top of the C++ swiftBasic and
provides Swift functionality for it. That can be used by the C++
swiftAST to cache the StaticBuildConfiguration on the ASTContext,
making it available for other parts of ASTGen.
2025-09-29 18:42:15 -07:00
Doug Gregor
ae8f9d8234
Add -print-static-build-config to print a static build conformance
...
Introduce the ability to form a `StaticBuildConfiguration` from
language options. Add a frontend option `-print-static-build-config`
to then print that static build configuration as JSON in a manner that
can be decoded into a `StaticBuildConfiguration`.
Most of the change here is in sinking the bridged ASTContext queries
of language options into a new BridgedLangOptions. The printing of the
static build configuration only has a LangOptions (not an ASTContext),
so this refactoring is required for printing.
2025-09-29 18:42:14 -07:00
Erik Eckstein
0a8c60290f
AST: add Type.interfaceTypeOfArchetype and some related APIs
2025-08-26 16:38:19 +02:00
Erik Eckstein
0a953b60ca
SIL/AST: add var InjectEnumAddrInst.element and var EnumElementDecl.hasAssociatedValues
2025-08-03 11:06:15 +02:00
Anthony Latsis
5620abbad8
Bridging: Bridge swift::CharSourceRange directly
2025-07-15 21:34:48 +01:00
Anthony Latsis
9001ce4687
Bridging: Bridge swift::SourceRange directly
2025-07-15 21:33:28 +01:00
Anthony Latsis
6eb5d7d857
Bridging: Bridge swift::SourceLoc directly
2025-07-15 21:33:06 +01:00
Anthony Latsis
8cbf5a26e4
Bridging: Bridge swift::DeclBaseName directly
2025-07-10 17:58:13 +01:00
Anthony Latsis
0e0fbc4160
Bridging: Bridge swift::Identifier directly
2025-07-10 17:58:13 +01:00
Anthony Latsis
f131fece3f
[NFC] Bridging: Rework include caveats
2025-07-10 17:58:13 +01:00
Anthony Latsis
b803861257
Bridging: Rename USED_IN_CPP_SOURCE and define it in Basic/SwiftBridging.h
2025-07-10 17:58:13 +01:00
Alexis Laferrière
81a0f98783
Merge pull request #82194 from xymus/cdecl-parser
...
Parser: Accept `@cdecl` with an optional identifier for a custom C name
2025-06-27 15:06:11 -07:00
eeckstein
1d3895610e
Merge pull request #82349 from eeckstein/alloc-box-to-stack
...
Optimizer: re-implement and improve the AllocBoxToStack pass
2025-06-21 07:28:18 +02:00
Anthony Latsis
dd78cd6dbe
ASTBridging: Bridge swift::PlatformKind directly
2025-06-20 16:46:03 +01:00
Anthony Latsis
de46b95e7e
ASTBridging: Bridge swift::GenericTypeParamKind directly
2025-06-20 16:46:03 +01:00
Anthony Latsis
dcbf2781c5
ASTBridging: Bridge swift::RequirementReprKind directly
2025-06-20 16:46:03 +01:00
Anthony Latsis
69a27e1735
ASTBridging: Bridge swift::LayoutConstraintKind directly
2025-06-20 16:46:03 +01:00
Anthony Latsis
b347aedeb0
ASTBridging: Encapsulate some operations on BridgedLayoutConstraint
...
NB: Switching from factory methods to initializers as well crashes on
Windows.
2025-06-20 16:44:49 +01:00
Erik Eckstein
1f304e5609
SIL: improve APIs for Box types
...
* move `isBox` from `SIL.Type` to `TypeProperties` to make it also available for AST types
* add `BoxFieldsArray.isMutable(fieldIndex:)`
2025-06-20 08:14:59 +02:00
Erik Eckstein
d025e9f7a5
SIL: add var Argument.decl: ValueDecl?
2025-06-20 08:14:58 +02:00
Anthony Latsis
30a8b59c6e
ASTBridging: Bridge swift::TypeAttrKind directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
8501c8776e
ASTBridging: Bridge swift::ExternKind directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
0b0ebfc9fb
ASTBridging: Bridge swift::ExposureKind directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
b2b79f3ad7
ASTBridging: Bridge swift::InlineKind directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
6527be558a
ASTBridging: Bridge swift::NonIsolatedModifier directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
29ef3e300f
ASTBridging: Bridge swift::InheritActorContextModifier directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
68bb4b33f9
ASTBridging: Bridge swift::EffectsKind directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
12de029d97
ASTBridging: Bridge swift::AccessLevel directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
cf09773d66
ASTBridging: Bridge swift::Associativity directly
2025-06-19 18:11:40 +01:00
Anthony Latsis
38360fe625
ASTBridging: Bridge swift::DeclAttrKind directly
2025-06-19 18:11:39 +01:00
Anthony Latsis
722bc0f086
ASTBridging: Bridge swift::DiagID directly
2025-06-19 12:29:27 +01:00
Anthony Latsis
3e9923f0c0
ASTBridging: Bridge swift::AccessorKind directly
2025-06-19 04:26:52 +01:00
Anthony Latsis
b40b192227
ASTBriding: Bridge swift::DiagnosticKind directly
2025-06-16 19:11:35 +01:00
Anthony Latsis
106d5f4461
{AST,Basic}Bridging: Use SWIFT_COMPUTED_PROPERTY
2025-06-16 19:11:32 +01:00
Alexis Laferrière
d9566c6c1e
ASTGen: Accept @cdecl
2025-06-11 12:42:38 -07:00
Meghana Gupta
0dfa1fc312
Update spelling for representing lifetime dependencies to @_lifetime
2025-06-07 12:49:07 -07:00
Pavel Yaskevich
4b5105df5e
[ASTGen] Implement bridging for using declaration
2025-05-30 15:52:09 -07:00
Erik Eckstein
28985f4d41
Swift AST: add var EnumDecl.hasRawType
2025-05-29 08:12:17 +02:00
Arnold Schwaighofer
13ff5abdb8
Introduce @specialized attribute
...
Implements SE-0460 -- the non-underscored version of @specialized.
It allows to specify "internal" (not abi affecting) specializations.
rdar://150033316
2025-05-23 13:12:47 -07:00
Erik Eckstein
dbd0af063c
AST: add some BuiltinFixedArray and IntegerType APIs
2025-05-15 21:29:02 +02:00