Commit Graph

79 Commits

Author SHA1 Message Date
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Brian Gesiak
2eb028b5ce [test] Mark tests unsupported on all Linux flavors
Autolinking was added to the frontend in 22912bc3b. It was disabled on
Linux in 198402dcf, and further constrained to be disabled on "linux-gnu"
in 83b4384fa. Since then, more flavors of Linux have become supported
by Swift: "linux-gnueabihf" in 4bf81e09d, and "freebsd" in f41b791d4.

Autolinking most likely does not work on any of these platforms, so
mark it as unsupported for now.

Other tests that only mark "linux-gnu" as unsupported do so for similar
reasons. Ensure unsupported tests for "linux-gnu" are also unsupported
on similar platforms.
2016-01-25 11:57:14 -05:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Jordan Rose
bcff26193e Teach the frontend about -output-filelist.
Finishes up https://bugs.swift.org/browse/SR-280. At this point, nothing
should be passing O(N) arguments on the command line, where N is the
number of input source files, unless N is small.

(There are other inputs which are passed through to subtools, and these
are not put into filelists. That's fine.)
2016-01-13 18:41:05 -08:00
Dmitri Gribenko
03f5f015d7 test/Frontend/filelist.swift: don't fail if a temporary file does not exist 2016-01-12 21:38:31 -07:00
Jordan Rose
ad945426a0 Teach the frontend about -filelist for input files.
With this, we're out of the business of passing large numbers of input
files on the command line to the frontend, which means we no longer
overflow argv with a mere 1100 input files under whole-module optimization.

In order to make sure this doesn't happen again, I'd like to also get
this working for
- swiftmodule inputs to the merge-module build phase
- /output/ files for multithreading single-frontend builds (WMO)
- object file inputs to the linker on OS X (response files for binutils
  ld have different quoting rules)

Part 3 of https://bugs.swift.org/browse/SR-280.
2016-01-12 19:20:50 -08:00
Max Moiseev
51865a17b2 _debugRequire => _stdlibAssert etc. 2015-12-22 10:18:36 -08:00
Maxim Moiseev
c4763ae686 _debugPrecondition => _debugRequire 2015-12-16 17:20:40 -08:00
Maxim Moiseev
e6468a0eca _precondition => _require 2015-12-16 17:19:01 -08:00
Nadav Rotem
9617af5956 Remove the flag -disable-func-sig-opts from a bunch of tests.
This commit removes the flag '-disable-func-sig-opts' from a bunch of tests and
fixes all of the affected tests.  This flag was introduces when the
function-signature-opt optimization was introduced and we did not port the old
tests. Now the day has come to clean all of the old tests and delete the flag.
2015-12-01 22:26:10 -08:00
Daniel Dunbar
778f82939c [Frontend] Escape target names in dependencies output.
- <rdar://problem/23691798> swiftc does not properly quote spaces in output paths in dependency file target names
2015-12-01 00:31:16 -08:00
Jordan Rose
d380e0e69e Fix clang-args-diags.swift test for public Clang's output.
Public Clang calls itself "Clang"; Apple Clang calls itself "Apple LLVM".
The test doesn't actually care what the name is; it's just trying to make
sure that the importer is failing for the reason we expect, rather than
something unrelated.

rdar://problem/23506925
2015-11-16 14:02:33 -08:00
Michael Gottesman
8e9ab12b3d Add two requires lines that for some reason escaped my initial commit of the stable merge.
This is due to embed-bitcode not being upstreamed.
2015-11-12 09:51:22 -08:00
Michael Gottesman
576e656896 Disable test clang-args-diags.swift until Jordan has a chance to look at it.
rdar://23506925
2015-11-11 16:07:42 -08:00
Michael Gottesman
48814dafd5 Update commandline options passed to llvm-objdump for upstream changes. 2015-11-11 16:07:41 -08:00
Joe Groff
0cd5aa8c7c Change mangling for the Swift module from 'Ss' to 's'.
'Ss' appears in manglings tens of thousands of times in the standard library and is also incredibly frequent in other modules. This alone is enough to shrink the standard library by 59KB.

Swift SVN r32409
2015-10-02 22:39:44 +00:00
Michael Gottesman
873c8f4cac Add missing llvm datalayout to two tests.
Swift SVN r31816
2015-09-09 04:37:39 +00:00
Jordan Rose
0e3e08f0c6 [ClangImporter] Use Clang's -fembed-bitcode mode when under -embed-bitcode.
This should have no functionality change, but is supposed to keep us from
accidentally relying on the "full" Clang importer when in a backend job.
I tested it by archiving a little iOS app from a developer.

Unfortunately, part of the motivation here was that we'd get error messages when
we pass something Clang doesn't like, and that doesn't seem to be happening.

rdar://problem/21389553

Swift SVN r30407
2015-07-20 17:23:51 +00:00
Jordan Rose
c79952389c Dependencies: rename entries in the .swiftdeps file to something sensible.
- (depends|provides)-top-level for top-level names.
- (depends|provides)-nominal for access into nominal types.
- (depends|provides)-dynamic-lookup for @objc members available on AnyObject.
- depends-external for cross-module file-based dependencies.

No functionality change.

Swift SVN r30283
2015-07-16 23:36:26 +00:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
David Farler
5dbc33f8ac Don't crash the frontend if a bad target is given
Provide a chance to emit a diagnostic instead.

rdar://problem/20931800

Swift SVN r28940
2015-05-23 00:58:05 +00:00
Arnold Schwaighofer
28616fbeb8 This test relies on inlining not to happen. Disable inlining.
LLVM is pretty insistent to inline the value 1995 regardless of a noinline
attribute. So I disabled llvm optimizations.

Swift SVN r28675
2015-05-17 03:31:20 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Doug Gregor
793b3326af Implement the new rules for argument label defaults.
The rule changes are as follows:
  * All functions (introduced with the 'func' keyword) have argument
  labels for arguments beyond the first, by default. Methods are no
  longer special in this regard.
  * The presence of a default argument no longer implies an argument
  label.

The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.

With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.

Fixes rdar://problem/17218256.

Swift SVN r27704
2015-04-24 19:03:30 +00:00
Luqman Aden
a33c518e98 tests: use substitution to pick the right llvm-link.
Swift SVN r27621
2015-04-23 01:51:47 +00:00
Luqman Aden
ce4bff5645 Frontend: Allow passing .sil as -primary-file along with other .sib as input.
Swift SVN r27612
2015-04-22 22:53:18 +00:00
Manman Ren
63184b250b Fix testing case for rdar://20485995
Swift SVN r27182
2015-04-09 21:57:29 +00:00
Manman Ren
0f7fb29331 [bitcode] use __swift_cmdline instead of __cmdline to differentiate from clang.
Swift SVN r25716
2015-03-03 20:00:19 +00:00
Graham Batty
98be432723 Updating tests and flags for linux
Swift SVN r25714
2015-03-03 18:26:20 +00:00
Manman Ren
9d680564db [Driver] fix support for -embed-bitcode-marker.
Move helper function EmbedBitcode() from frontend_main.cpp to IRGen.cpp so we
can call it from performIRGeneration when the input file is Swift.

Add testing case to make sure that -embed-bitcode-marker option adds an
empty LLVM bitcode section.

rdar://19048891


Swift SVN r25577
2015-02-27 00:37:35 +00:00
Manman Ren
48fa3d2e21 [Driver] actually embed bitcode and command line arguments for -embed-bitcode.
With -embed-bitcode, save a copy of the llvm IR as data in the __LLVM,__bitcode
section and save the command-line options in the __LLVM,__cmdline section.

rdar://19048891


Swift SVN r25560
2015-02-26 20:29:46 +00:00
Manman Ren
d39f8e49a8 [Driver] make Swift accept bitcode input.
Thanks Jordan for reviewing the patches.
rdar://19048891


Swift SVN r25558
2015-02-26 19:31:09 +00:00
Jordan Rose
879ce47526 [test] Fix RUN lines missing their RUN.
Swift SVN r25409
2015-02-20 02:26:50 +00:00
Jordan Rose
8f615f5549 Frontend: don't crash using -emit-reference-dependencies without -primary-file.
For now, just emit a warning. Later on we can actually get this right for
multiple files.

This is important for people manually trying to reduce run lines that come
from Xcode.

rdar://problem/19786899

Swift SVN r25388
2015-02-19 02:28:32 +00:00
Michael Gottesman
a598b46fc1 Add support for -Oplayground and add some sanity tests for it.
Right now this is just like -Onone. We will add further optimizations as
needed.

<rdar://problem/19328293>

Swift SVN r25377
2015-02-18 22:30:26 +00:00
Dmitri Hrybenko
f43843f25c tests: use the new substitution for the mock SDK
This is required to correctly use the mock SDK when the SDK overlay is
built and tested separately.  (Otherwise, the mock SDK might not get
used, because the overlay SDK options would expand from the
%-substitution, appear first on the command line, and shadow the mock
SDK in the search path).

Swift SVN r25185
2015-02-11 18:57:29 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Jordan Rose
da46727f8f Always emit .d and .swiftdeps files, even if there were errors in the AST.
Yes, they may not be correct, but the stale ones that were there before
won't be correct either (if they were there at all). This should make both
Xcode and the Swift driver less likely to have issues when there's an error
in a newly added file.

Goes with rdar://problem/19640006

Swift SVN r24824
2015-01-29 21:59:23 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Jordan Rose
97b3a3da40 Include cross-module dependencies in swiftdeps files.
These are the same dependencies collected for .d files, including
headers and imported swiftmodules. These can also cause a file to be out
of date.

Part of rdar://problem/19270920

Swift SVN r24334
2015-01-10 00:38:09 +00:00
Jordan Rose
7da40344e9 [test] Weaken test for .d file generation.
The SwiftShims module is a private dependency of the standard library,
so it shouldn't really show up in the generated .d file. However, it's
doing any harm by being there in +Asserts builds, so for now just don't
check. See rdar://problem/19318312.

Swift SVN r24096
2014-12-23 01:24:50 +00:00
Dmitri Hrybenko
dab5fe14fe test/Frontend/dependencies.swift fails when the compiler is built
without assertions, XFAIL it.

Swift SVN r24059
2014-12-20 09:42:55 +00:00
David Farler
31a43d893d Disable OptimizationOptions-without-stdlib-checks
Because the bots build a release+asserts compiler and an unchecked stdlib, this
test is not currently applicable. The checked version of this test was disabled
but this test should've been disabled as well.

Original commit message r23074:

Fix the bots by requiring two options on this test that never can co-exist as true.

This is to work around a bug on the unchecked optimized stdlib builder which due
to a problem in the cmake build chain runs the checks enabled version of this
test. This commit makes sure that the test will not run until this is resolved.

Swift SVN r23624
2014-12-03 00:04:40 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Michael Gottesman
5f32f6b3d8 Fix the bots by requiring two options on this test that never can co-exist as true.
This is to work around a bug on the unchecked optimized stdlib builder which due
to a problem in the cmake build chain runs the checks enabled version of this
test. This commit makes sure that the test will not run until this is resolved.

Swift SVN r23074
2014-11-03 01:41:37 +00:00
Michael Gottesman
38f4ab8caa XFAIL this test so we can get perf numbers. It is due to a configuration issue on the buildbots.
Swift SVN r23045
2014-11-01 00:16:22 +00:00
Michael Gottesman
43707235f2 Really fix this test by creating separate tests one for when the stdlib is compiled with checks and one where it is not.
Swift SVN r23035
2014-10-31 17:57:42 +00:00
Michael Gottesman
9d838980d0 [func-sig-opts] Fixup test.
Swift SVN r23029
2014-10-31 04:40:35 +00:00