Commit Graph

1705 Commits

Author SHA1 Message Date
Hamish Knight
b3dcef9796 Avoid unnecessary linking in SIL tools
Previously we were linking in all SIL entities
if the input was a serialized non-SIB AST, and
`-disable-sil-linking` wasn't specified. However
none of the tests appear to want this behaviour.

Stop calling `SerializedSILLoader::getAll`, and
remove the `-disable-sil-linking` option, as this
is now the default behaviour.
2020-07-01 23:14:01 -07:00
swift_jenkins
defc7b3da0 Merge remote-tracking branch 'origin/master' into master-next 2020-07-01 09:38:16 -07:00
Erik Eckstein
67605553df SIL: a new instruction 'base_addr_for_offset' for field offset calculations.
The ``base_addr_for_offset`` instruction creates a base address for offset calculations.
The result can be used by address projections, like ``struct_element_addr``, which themselves return the offset of the projected fields.
IR generation simply creates a null pointer for ``base_addr_for_offset``.
2020-07-01 15:10:08 +02:00
swift_jenkins
f9d51789af Merge remote-tracking branch 'origin/master' into master-next 2020-06-24 11:40:16 -07:00
Saleem Abdulrasool
f77e794977 test: make binary_sub python 2, 3 compatible
In order to access `stdin`, `stdout` as binary, you must use the
`buffer` member in Python 3.  The replacement of the binary data
requires that pattern and the replacement be byte objects.  Convert the
pattern and replacement to UTF-8 encoded bytes.
2020-06-23 08:19:08 -07:00
swift_jenkins
aac020c9c8 Merge remote-tracking branch 'origin/master' into master-next 2020-06-16 12:59:48 -07:00
Pavel Yaskevich
16862e50a5 Merge pull request #31713 from xedin/no-ranking-with-ambiguous-with-fixes
[ConstraintSystem] Overhaul ambiguity diagnostics
2020-06-16 12:55:14 -07:00
swift_jenkins
10cca05345 Merge remote-tracking branch 'origin/master' into master-next 2020-06-15 11:59:07 -07:00
3405691582
c8ba437444 [test] Handle architecture aliasing for OpenBSD.
Swift calls the architecture x86_64, OpenBSD calls it amd64. If we use
run_cpu in lit.cfg as-is, then we may need to duplicate lines in each
test for 'x86_64' and 'amd64', which puts a maintenance burden on unit
test developers to ensure they are duplicating changes to each line.

Instead, alias 'amd64' to 'x86_64' for `run_cpu`, but keep the platform
module path referring to 'amd64', in order to distinguish the target
architecture name and the Swift architecture name. This is particularly
relevant for the %target-.*-name pseudovariables used, which should
reference the Swift architecture names.

However, some unit tests are directly referencing %target-cpu directly,
which would break the aliasing. This is done only for swiftinterface
files, so a new substitution is defined in lit.cfg for these variables,
and the affected unit test cases are migrated.
2020-06-12 21:06:37 -04:00
Pavel Yaskevich
d9594c712a [TypeChecker] NFC: Adjust tests improved by new approach for ambiguity diagnosis 2020-06-12 11:47:03 -07:00
Karoy Lorentey
68351d2110 Revert "Merge remote-tracking branch 'origin/master-next'"
This reverts commit 1c9b0908e6, reversing
changes made to 3eb82c1836.
2020-06-08 16:48:38 -07:00
swift_jenkins
8cfaff7371 Merge remote-tracking branch 'origin/master' into master-next 2020-05-29 11:19:36 -07:00
Alexis Laferrière
94ff157c60 Merge pull request #32070 from xymus/spi-swiftdoc
[Serialization] Skip SPI documentation in swiftdoc files
2020-05-29 11:09:13 -07:00
swift_jenkins
b84e995326 Merge remote-tracking branch 'origin/master' into master-next 2020-05-28 16:38:52 -07:00
Alexis Laferrière
56c77df926 [Serialization] Skip SPI documentation in swiftdoc files
Hide comments from SPI decls in all swiftdoc files. This applies the
same restrictions as private declarations. This is a temporary solution,
a long term fix is to emit both a public and an internal swiftdoc file.

rdar://63729195
2020-05-28 12:58:59 -07:00
Hamish Knight
21b733b4a1 [Frontend] Set "failed to load" for failed partial module
If a partial module fails to load, the main module
may be left without files, so let's set the failed
to load bit.
2020-05-28 11:32:12 -07:00
swift_jenkins
d0cf0c2f6e Merge remote-tracking branch 'origin/master' into master-next 2020-05-26 11:19:07 -07:00
Doug Gregor
8e0ec601db Merge pull request #32005 from DougGregor/function-builder-infer
[Function builders] Infer function builder from a protocol requirement.
2020-05-26 10:59:42 -07:00
Doug Gregor
8cec6b555d [Function builders] Add tests for function builders on protocol requirements 2020-05-25 23:42:45 -07:00
swift_jenkins
dbba29435f Merge remote-tracking branch 'origin/master' into master-next 2020-05-23 10:18:38 -07:00
David Zarzycki
97c89d8d3a Remove three ObjC fields from non-ObjC runtime 2020-05-22 09:21:21 -07:00
swift_jenkins
f375a35b29 Merge remote-tracking branch 'origin/master' into master-next 2020-05-14 02:19:22 -07:00
Erik Eckstein
f5a8f600ea SIL: new instructions for copy-on-write support
* a new [immutable] attribute on ref_element_addr and ref_tail_addr
* new instructions: begin_cow_mutation and end_cow_mutation

These new instructions are intended to be used for the stdlib's COW containers, e.g. Array.
They allow more aggressive optimizations, especially for Array.
2020-05-14 08:39:54 +02:00
swift_jenkins
b9a5f31375 Merge remote-tracking branch 'origin/master' into master-next 2020-05-08 10:01:47 -07:00
David Zarzycki
5dcc32f98f Remove all uses of -force-single-frontend-invocation
The `-force-single-frontend-invocation` flag predates WMO and is now an
alias for `-whole-module-optimization`. We should use the latter and let
the former fade into history.
2020-05-08 06:37:41 -04:00
swift_jenkins
04271f4cbf Merge remote-tracking branch 'origin/master' into master-next 2020-04-28 14:20:03 -07:00
Varun Gandhi
a1716fe2a6 [Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
2020-04-28 14:11:39 -07:00
swift_jenkins
1f69a82f5a Merge remote-tracking branch 'origin/master' into master-next 2020-04-24 19:58:15 -07:00
Varun Gandhi
811d6a5fe7 [NFC] [arm64e] Delete arm64e fallback test. (#31297) 2020-04-24 19:38:54 -07:00
swift_jenkins
537100831f Merge remote-tracking branch 'origin/master' into master-next 2020-04-20 12:57:17 -07:00
Doug Gregor
574f0e8a5b [Platform] Stop inferring simulator-ness.
The *-simulator target triples have been used consistently in tools for
several years to indicate simulator targets. Stop inferring the
simulator part, rdar://problem/35810403.
2020-04-20 08:50:34 -07:00
swift_jenkins
9458dc803c Merge remote-tracking branch 'origin/master' into master-next 2020-04-19 18:18:29 -07:00
Saleem Abdulrasool
fbbf61f297 Revert "[Darwin] Further restrict inference of the simulator environment" 2020-04-19 16:43:22 -07:00
swift_jenkins
1acb641f2c Merge remote-tracking branch 'origin/master' into master-next 2020-04-17 21:17:31 -07:00
Doug Gregor
22cdddd84e Merge pull request #30771 from DougGregor/stop-inferring-simulator
[Darwin] Further restrict inference of the simulator environment
2020-04-17 20:59:39 -07:00
swift_jenkins
ea8ac5e9f9 Merge remote-tracking branch 'origin/master' into master-next 2020-04-16 16:17:38 -07:00
Pavel Yaskevich
386b622717 Merge pull request #31077 from apple/revert-30429-optimize/remove-dead-in-mand-combine
Revert "[opt] remove trivially dead instructions in mandatory combine"
2020-04-16 16:05:29 -07:00
swift_jenkins
999d033f4f Merge remote-tracking branch 'origin/master' into master-next 2020-04-16 15:57:40 -07:00
Alexis Laferrière
2fbc063b2e [Serialization] Note the misc version field of modules on deser. failures
This added information will hopefully help us understand hard to
reproduce deserialization failures.
2020-04-16 13:50:11 -07:00
Doug Gregor
7e7dc648f2 [Platform] Stop inferring simulator-ness.
The *-simulator target triples have been used consistently in tools for
several years to indicate simulator targets. Stop inferring the
simulator part, rdar://problem/35810403.
2020-04-16 11:35:43 -07:00
Pavel Yaskevich
8d392b48d0 Revert "[opt] remove trivially dead instructions in mandatory combine" 2020-04-16 10:26:29 -07:00
swift_jenkins
477d666eef Merge remote-tracking branch 'origin/master' into master-next 2020-04-15 13:37:43 -07:00
zoecarver
4cc98f0070 [opt] Remove trivially dead instructions in mandatory combine.
Failing tests that do not test mandatory combine are updated to skip
the mandatory combine pass. Othere tests are updated to use otherwise
removed values.
2020-04-14 23:39:11 -07:00
swift_jenkins
a6de8486e1 Merge remote-tracking branch 'origin/master' into master-next 2020-04-10 15:20:30 -07:00
Artem Chikin
efdfceeb9b [Sema] Diagnose use of implementation-only property wrappers
We already ban all structs from declaring storage that comes from implementation-only imports. Until now we missed property wrappers, they were just dropped in deserialization.

Resolves rdar://problem/59403617
2020-04-10 11:19:42 -07:00
swift_jenkins
49ddc4b2be Merge remote-tracking branch 'origin/master' into master-next 2020-04-06 14:20:36 -07:00
Robert Widmann
ba97afc138 Fix the gates on a test that needs statistics
rdar://61348443
2020-04-06 11:00:26 -07:00
swift_jenkins
4759f2e692 Merge remote-tracking branch 'origin/master' into master-next 2020-04-06 10:41:54 -07:00
Xi Ge
8d0e38e364 test: disable Serialization/multi-file-type-eraser.swift for failing in public CI
rdar://61348443
2020-04-06 10:39:25 -07:00
swift_jenkins
4b729313a3 Merge remote-tracking branch 'origin/master' into master-next 2020-04-03 22:40:07 -07:00