Commit Graph

4047 Commits

Author SHA1 Message Date
Xi Ge
0047d81f9a serialization: obfuscate the serialized search paths
We noticed some Swift clients rely on the serialized search paths in the module to
find dependencies and droping these paths altogether can lead to build failures like
rdar://85840921.

This change teaches the serialization to obfuscate the search paths and the deserialization
to recover them. This allows clients to keep accessing these paths without exposing
them when shipping the module to other users.
2021-12-01 11:47:41 -08:00
Ben Barham
a051a181b9 [rebranch] Include C++ std headers where required
These appear to be implicitly included somewhere by MacOS but not by
Linux. Add explicitly.
2021-12-01 15:45:06 +10:00
Holly Borla
9196c9ad41 [FrontendOptions] Enable structural opaque result types and remove
the -enable-experimental-structural-opaque-types frontend flag.
2021-11-30 15:41:23 -08:00
swift_jenkins
cfc869e7b2 Merge remote-tracking branch 'origin/main' into next 2021-11-30 11:00:45 -08:00
swift-ci
c689ee5f21 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-30 10:53:10 -08:00
Kuba (Brecka) Mracek
c89eca6c34 Enforce consistent usage of -experimental-hermetic-seat-at-link flag (#39986)
We've recently added the -experimental-hermetic-seal-at-link compiler flag,
which turns on aggressive dead-stripping optimizations and assumes that library
code can be optimized against client code because all users of the library
code/types are present at link/LTO time. This means that any module that's
built with -experimental-hermetic-seal-at-link requires all clients of this
module to also use -experimental-hermetic-seal-at-link. This PR enforces that
by storing a bit in the serialized module, and checking the bit when importing
modules.
2021-11-30 10:44:58 -08:00
swift-ci
ee96d2798c Merge remote-tracking branch 'origin/main' into rebranch 2021-11-30 08:33:02 -08:00
swift_jenkins
c0251d5f7c Merge remote-tracking branch 'origin/main' into next 2021-11-30 08:20:36 -08:00
Saleem Abdulrasool
349af3707d Merge pull request #40305 from compnerd/semitruck
gardening: make c++98-compat-extra-semi an error
2021-11-30 08:18:36 -08:00
swift-ci
da37eff662 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-30 02:13:40 -08:00
swift_jenkins
7a7886c410 Merge remote-tracking branch 'origin/main' into next 2021-11-30 02:00:28 -08:00
Ben Barham
e78abc2b80 Merge pull request #40319 from bnbarham/loc-leaks
[AST] Prevent memory leak when allocating `ExternalSourceLocs`
2021-11-30 19:58:07 +10:00
swift-ci
917aa99862 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-30 00:33:02 -08:00
swift_jenkins
3e759560ba Merge remote-tracking branch 'origin/main' into next 2021-11-30 00:20:37 -08:00
Pavel Yaskevich
bc54bc6bb7 Revert "[TypeChecker] SE-0326: Enable multi-statement closure inference by default" 2021-11-29 17:26:08 -08:00
Ben Barham
50a73a3965 [AST] Prevent memory leak when allocating ExternalSourceLocs
c763ab5d1e fixed an issue in
`getSerializedLocs` where it never actually cached its result (and thus
always allocated a new `CachedExternalSourceLocs`). Unfortunately it
missed a leak that could occur when `DocRanges` grows beyond its initial
size of 4.

Allocate `DocRanges` upfront in the `ASTContext` as well in order to
prevent this leak.

Resolves rdar://85472403.
2021-11-30 10:31:31 +10:00
swift_jenkins
bcd8d65170 Merge remote-tracking branch 'origin/main' into next 2021-11-29 15:00:50 -08:00
swift-ci
9f8035987f Merge remote-tracking branch 'origin/main' into rebranch 2021-11-29 14:53:04 -08:00
Saleem Abdulrasool
910fbee14e gardening: make c++98-compat-extra-semi an error
This cleans up 90 instances of this warning and reduces the build spew
when building on Linux.  This helps identify actual issues when
building which can get lost in the stream of warning messages.  It also
helps restore the ability to build the compiler with gcc.
2021-11-27 11:40:17 -08:00
Slava Pestov
163293e6f9 RequirementMachine: Split up -requirement-machine-generic-signatures flag into -requirement-machine-{abstract,inferred}-signatures 2021-11-19 17:06:00 -05:00
swift_jenkins
ca34f0b35e Merge remote-tracking branch 'origin/main' into next 2021-11-19 12:20:59 -08:00
swift-ci
908cd43b0d Merge remote-tracking branch 'origin/main' into rebranch 2021-11-19 12:13:27 -08:00
swift-ci
17f1cf9297 Merge pull request #40240 from rxwei/string-processing-module 2021-11-19 12:12:06 -08:00
Richard Wei
65bffd7ad7 Add _MatchingEngine and _StringProcessing modules.
These modules are part of the experimental declarative string processing feature. If accepted to the Standard Library, _StringProcessing will be available via implicit import just like _Concurrency, though _MatchingEngine will still be hidden as an implementation detail.

`_MatchingEngine` will contain the general-purpose pattern matching engine ISA, bytecode, and executor. `_StringProcessing` will contain regular expression and pattern matching APIs whose implementation depends on the matching engine..

Also consolidates frontend flag `-enable-experimental-regex` as `-enable-experimental-string-processing`.

Resolves rdar://85478647.
2021-11-19 09:27:33 -08:00
swift_jenkins
3cec90f85b Merge remote-tracking branch 'origin/main' into next 2021-11-19 00:01:24 -08:00
swift-ci
df36f1fd14 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-18 23:53:49 -08:00
Doug Gregor
6d5d23aa18 Add a feature flag for Builtin.stackAlloc and friends
... and use it in inlinable code so older compilers don't break on
newer standard libraries, fixing rdar://85574956.
2021-11-18 21:00:05 -08:00
Ben Barham
bd4b73755b [next] Update DenseMapInfo declarations
llvm-project 4c484f11d355e4293f7b245a9330f0a1e89630ac updated the
`DenseMapInfo` template to take a SFINAE template parameter.
2021-11-18 21:58:56 +10:00
Ben Barham
0316c913c1 [rebranch] Delegate to DenseMapInfo<APInt> where possible
`WidthPreservingAPIntDenseMapInfo` uses the same `getHashValue` and
`isEqual` as the normal `DenseMapInfo` but with different empty and
tombstone keys. `hash_value` is no longer a complete type, so just
delegate to `DenseMapInfo<APInt>` rather than add another `#include`.
2021-11-18 21:58:55 +10:00
swift-ci
6b368bda82 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-17 10:33:34 -08:00
swift_jenkins
8e955a207b Merge remote-tracking branch 'origin/main' into next 2021-11-17 10:21:13 -08:00
Pavel Yaskevich
63f355fde0 Merge pull request #39989 from xedin/more-diag-improvements-for-multi-stmt-closures
[TypeChecker] SE-0326: Enable multi-statement closure inference by default
2021-11-17 10:14:58 -08:00
Ben Barham
11f28196bc Merge pull request #40168 from bnbarham/rebranch-failures
[rebranch] Fix compilation failures
2021-11-17 08:50:11 +10:00
swift-ci
db9d12508e Merge remote-tracking branch 'origin/main' into rebranch 2021-11-15 19:34:09 -08:00
swift_jenkins
abfca2c0fd Merge remote-tracking branch 'origin/main' into next 2021-11-15 19:21:14 -08:00
Pavel Yaskevich
b231cdeed4 [TypeChecker] SE-0326: Enable multi-statement closure inference by default 2021-11-15 18:32:40 -08:00
John McCall
c5c78c55f2 Add an insertAtFront method to the list merger.
The existing insert method preserves insertion order, but the
atomic queue use case actually wants to *reverse* the natural
insertion order.
2021-11-15 17:28:51 -05:00
swift_jenkins
a46802cd07 Merge remote-tracking branch 'origin/main' into next 2021-11-14 06:21:12 -08:00
swift-ci
265dacd35f Merge remote-tracking branch 'origin/main' into rebranch 2021-11-14 06:14:11 -08:00
Michael Ilseman
2740e2707c Experimental Regex Strawperson (use Swift in the parser) (#40117)
[regex] Use Swift in the parser

Add in a strawperson use of Swift by the parser, for
future regex support.
2021-11-14 07:11:47 -07:00
swift-ci
e7200268ed Merge remote-tracking branch 'origin/main' into rebranch 2021-11-13 09:34:28 -08:00
swift_jenkins
8957f23b16 Merge remote-tracking branch 'origin/main' into next 2021-11-13 09:21:15 -08:00
Artem Chikin
b10696ed5f Merge pull request #40160 from artemcm/SwiftScanTargetInfoQuery
Add `libSwiftScan` entry-point to query target info.
2021-11-13 09:16:09 -08:00
Ben Barham
de79a71b98 [rebranch] Delegate to DenseMapInfo<APInt> where possible
`WidthPreservingAPIntDenseMapInfo` uses the same `getHashValue` and
`isEqual` as the normal `DenseMapInfo` but with different empty and
tombstone keys. `hash_value` is no longer a complete type, so just
delegate to `DenseMapInfo<APInt>` rather than add another `#include`.
2021-11-13 17:04:29 +10:00
Artem Chikin
40a1b321f5 Add libSwiftScan entry-point to query target info.
This provides the library with functionality to answer `-print-target-info` queries in place of calls to `swift-frontend`.
2021-11-12 11:01:45 -08:00
swift_jenkins
2042414fb7 Merge remote-tracking branch 'origin/main' into next 2021-11-12 10:20:18 -08:00
swift-ci
16126f023d Merge remote-tracking branch 'origin/main' into rebranch 2021-11-12 10:14:07 -08:00
Slava Pestov
d0a8abb533 RequirementMachine: Add -requirement-machine-generic-signatures flag
Just as with the others, this has three values: on, off, and verify.
Not hooked up for now.
2021-11-12 00:32:43 -05:00
swift-ci
f2b9554570 Merge remote-tracking branch 'origin/main' into rebranch 2021-11-08 12:23:56 -08:00
swift_jenkins
1f836396ac Merge remote-tracking branch 'origin/main' into next 2021-11-08 12:20:35 -08:00