Michael Gottesman
6fff307328
Merge pull request #62592 from gottesmm/pr-cbfd912fd4d58ff272d3f1fe4ceb8cf02589da9a
...
[sil] Add a new attribute called @closureCaptured to SILFunctionArguments that are closure capture arguments.
2022-12-15 01:14:46 -08:00
swift-ci
81714ac2b1
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-14 20:14:11 -08:00
John McCall
6d4588c40b
Change SIL to track all LocalArchetypes and not just OpenedArchetypes.
2022-12-14 19:43:23 -05:00
Michael Gottesman
9e44011e4d
[sil] Add a new attribute called @closureCaptured to SILFunctionArguments that are closure capture arguments.
...
I am adding this to make it easy to determine if a SILFunction that is not inout
aliasable is captured. This is useful when emitting certain types of
diagnostics like I need to emit with move only.
2022-12-14 15:16:43 -08:00
Artem Chikin
3db767843e
[Dependency Scanning] Record whether discovered binary Swift modules are frameworks
...
Part of rdar://102824777
2022-12-13 10:44:37 -08:00
swift-ci
328e716489
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-12 07:33:19 -08:00
nate-chandler
7768b005a7
Merge pull request #62501 from nate-chandler/remove-in-constant
...
[SIL] Removed Indirect_In_Constant convention.
2022-12-12 07:29:12 -08:00
swift-ci
0a81949ad9
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-11 19:23:51 -08:00
Slava Pestov
1ca373a23d
Merge pull request #62466 from slavapestov/simplify-subst-function-type-pattern-visitor
...
Simplify SubstFunctionTypePatternVisitor
2022-12-11 22:13:57 -05:00
Nate Chandler
8d8577e5b0
[SIL] Removed Indirect_In_Constant convention.
...
It is no different from @in.
Continue parse @in_constant in textual and serialized SIL, but just as
an alias for @in.
2022-12-09 21:54:00 -08:00
swift-ci
b6ccc365d8
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-09 17:33:36 -08:00
Adrian Prantl
006ac8fadc
Don't require a strict revision match in LLDB for tagged compilers.
...
This is a follow-up to 3cc2831608 because the
relaxed checking introduced was being bypassed by the code block that checks for
a tagged compiler.
2022-12-09 12:05:25 -08:00
Slava Pestov
38169afc06
SIL: Simplify SubstFunctionTypePatternVisitor
2022-12-08 20:07:16 -05:00
swift-ci
91ca44d294
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-07 11:33:42 -08:00
Artem Chikin
f39c6385df
[Dependency Scanning] Do not disambiguate 'GlobalModuleDependenciesCache' by search path set
...
This is no longer necessary since the cache is always configured for the current scanning context hash, which includes the search path set.
2022-12-06 14:15:39 -08:00
swift-ci
9638cd3de8
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-02 12:37:21 -08:00
Adrian Prantl
6d84dffaff
Merge pull request #62345 from adrian-prantl/validate-search-paths
...
Expose Swift search paths in validateSerializedAST
2022-12-02 12:21:00 -08:00
Adrian Prantl
a5e1786a99
Expose Swift search paths in validateSerializedAST
...
This is for the benefit of LLDB, which currently does an expensive import of all
modules to get to the same information.
rdar://40097459
2022-12-01 13:14:08 -08:00
Erik Eckstein
d89c6b2d70
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-01 07:48:51 +01:00
Alexis Laferrière
0ce8b48e0d
[Serialization] Expect missing custom attribute in deserializeDeclCommon
...
Attr can be null here if it was a custom attribute from an
implementation-only dependency.
rdar://102525437
2022-11-30 16:48:13 -08:00
swift-ci
1acf8b039b
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-29 10:14:02 -08:00
Doug Gregor
e1102cc098
Merge pull request #62204 from DougGregor/macro-declarations
...
Macro declarations
2022-11-29 10:04:09 -08:00
swift-ci
93a51f5f46
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 23:53:25 -08:00
swift-ci
4e5749baa5
Merge pull request #61397 from adrian-prantl/64511878
...
Turn (most) deserialization errors from a crash into a fatal diagnostic
2022-11-28 23:49:42 -08:00
Doug Gregor
bbbc346768
[Macros] Treat MacroDecl as a local context, like functions are.
2022-11-28 18:33:10 -08:00
Doug Gregor
1a124e71d6
[Macros] Implement AST printing and module interface generation for macros
2022-11-28 18:33:10 -08:00
Doug Gregor
4ce0834c51
[Macros] Serialization support for macro declarations.
2022-11-28 18:33:09 -08:00
swift-ci
713223eb4c
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 18:14:43 -08:00
Xi Ge
afbc4a5ffd
Merge pull request #62251 from nkcsgexi/allowable-serialization
...
serialization: encode allowable client names in binary module format
2022-11-28 18:12:43 -08:00
Adrian Prantl
28d7f8813c
Turn (most) deserialization errors from a crash into a fatal diagnostic (NFC)
...
Currently, ModuleFileSharedCore::fatal() calls abort(), which may be reasonable
in a swift-frontend invocation, but has dire consequences when the Swift
frontend is embedded into another process, for example, LLDB where the abort()
kills the entire debugging session.
This patch introduces a few alternatives to the ModuleFile::fatal() familiy of
functions that instead push a fatal diagnostic to the ASTContext's
DiagnosticsEngine and return an llvm::Error so the error can be roperly
communicated and the ASTContext can be wound down without killing the parent
process.
The transition is not complete, this patch does not yet handle
fatalIfUnexpected(), for example.
This patch is NFC for the Swift compiler: When DebuggerSupport in off
ModuleFile::diagnoseFatal() will still call abort(), but if it is on, the error
will be passed up, together with a pretty stack trace.
rdar://64511878
2022-11-28 15:54:27 -08:00
swift-ci
fa97319512
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 14:33:53 -08:00
Alexis Laferrière
c266e9dce5
Merge pull request #62185 from xymus/improve-rmodule-loading
...
Improve `-Rmodule-loading` to show both the path to the source and to the cached file actually loaded
2022-11-28 14:25:15 -08:00
swift-ci
eae59fec9e
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 12:54:03 -08:00
Xi Ge
29504bdd5f
Merge branch 'main' into allowable-serialization
2022-11-28 12:36:52 -08:00
Holly Borla
c225fc428b
Merge pull request #62228 from hborla/pack-element-generic-environment
...
[GenericEnvironment] Include original parameter packs in opened pack element signatures.
2022-11-28 15:34:35 -05:00
Xi Ge
5987654b3a
Merge branch 'main' into allowable-serialization
2022-11-28 09:36:04 -08:00
swift-ci
efef52a86e
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 09:33:40 -08:00
Xi Ge
67bbab7e02
serialization: encode allowable client names in binary module format
2022-11-25 18:43:40 -08:00
Holly Borla
8ec5405a30
[GenericEnvironment] Store a substitution map for the outer generic parameters
...
of an opened pack element generic environment.
2022-11-23 11:17:05 -05:00
Erik Eckstein
ab1b343dad
use new llvm::Optional API
...
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`
The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.
rdar://102362022
2022-11-21 19:44:24 +01:00
Alexis Laferrière
319d49816d
[Frontend] -Rmodule-loading shows both source path and cached path
2022-11-18 15:28:16 -08:00
Rintaro Ishizaki
d458c8b74a
Merge remote-tracking branch 'origin/main' into rebranch
...
Conflicts:
include/swift/Sema/ConstraintSystem.h
include/swift/Syntax/AbsoluteRawSyntax.h
include/swift/Syntax/Syntax.h
include/swift/Syntax/SyntaxData.h
lib/DependencyScan/ModuleDependencyCacheSerialization.cpp
lib/Syntax/SyntaxFactory.cpp.gyb
lib/Syntax/SyntaxNodes.cpp.gyb
tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
tools/swift-syntax-test/swift-syntax-test.cpp
2022-11-18 09:37:38 -08:00
Allan Shortlidge
3da18b6e68
SIL: Serialize and deserialize has_symbol instructions.
2022-11-16 16:07:59 -08:00
Allan Shortlidge
0a24042cdd
SIL: Introduce the has_symbol SIL instruction.
2022-11-16 16:07:26 -08:00
Artem Chikin
1a9a15f137
Merge pull request #62116 from artemcm/DepScanSwiftOutputPath
...
[Dependency Scanning] Produce canonical output path for Swift binary modules.
2022-11-16 15:46:21 -08:00
swift-ci
4f15894c4c
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-16 09:14:18 -08:00
Pavel Yaskevich
9a02c79cbb
[Serialization] Bump module format version due to @runtimeMetadata attribute
2022-11-15 21:06:34 -08:00
Artem Chikin
729ad402df
[Dependency Scanning] Produce canonical output path for Swift binary modules.
...
Instead of relying on the client (driver) to perform its own computation of the matching output path.
2022-11-15 11:08:13 -08:00
swift-ci
d84510cfda
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-15 09:35:04 -08:00
Alexis Laferrière
f7414ed41c
Merge pull request #62102 from xymus/spi-reexported-export-as
...
[Sema] Restrict reexported SPIs to modules with an `export_as` relationship
2022-11-15 09:15:34 -08:00