Commit Graph

1133 Commits

Author SHA1 Message Date
swift-ci
d2cb1fbee9 Merge remote-tracking branch 'origin/master' into master-next 2018-04-16 11:08:33 -07:00
swift-ci
80defe51b7 Merge pull request #15950 from gottesmm/pr-ad010a566f73a3f80c1bce1ac1d652208c260c8b 2018-04-16 10:51:52 -07:00
swift-ci
f34fcf47cd Merge remote-tracking branch 'origin/master' into master-next 2018-04-16 10:48:14 -07:00
Michael Gottesman
26a569b33c [stringref-upgrade] Change FrontendInputsAndOutputs::numberOfPrimaryInputsEndingWith to take a StringRef instead of a const char *.
This is in prepration for changing Strings.h to use StringLiteral.
2018-04-16 09:50:54 -07:00
Michael Gottesman
87d633b4cd [stringref-upgrade] Return a StringRef from suffixForPrincipalOutputFileForAction instead of a const char *.
This is in prepration for changing Strings.h to use StringLiteral.
2018-04-16 09:50:26 -07:00
swift-ci
0d728ccabb Merge remote-tracking branch 'origin/master' into master-next 2018-04-10 07:29:08 -07:00
Slava Pestov
c7853fe086 IRGen: Bring back the -enable-class-resilience staging flag 2018-04-09 21:53:45 -07:00
swift-ci
43ff3494c2 Merge remote-tracking branch 'origin/master' into master-next 2018-04-09 16:21:22 -07:00
Slava Pestov
81cf1d951d SIL: Remove -sil-link-all frontend flag
It was only used in a few tests. Those tests now use -emit-sil instead
of -emit-silgen, with some functions marked @_transparent and a few
CHECK: lines changed now that the mandatory optimizations get to run.
2018-04-09 13:27:52 -07:00
swift-ci
d7744cc9c1 Merge remote-tracking branch 'origin/master' into master-next 2018-04-07 16:10:18 -07:00
John McCall
7815892a76 Add unique typo corrections to the main diagnostic with a fix-it.
Continue to emit notes for the candidates, but use different text.
Note that we can emit a typo correction fix-it even if there are
multiple candidates with the same name.

Also, disable typo correction in the migrator, since the operation
is quite expensive, the notes are never presented to the user, and
the fix-its can interfere with the migrator's own edits.

Our general guidance is that fix-its should be added on the main
diagnostic only when the fix-it is highly likely to be correct.
The exact threshold is debateable.  Typo correction is certainly
capable of making mistakes, but most of its edits are right, and
when it's wrong it's usually obviously wrong.  On balance, I think
this is the right thing to do.  For what it's worth, it's also
what we do in Clang.
2018-04-07 16:01:39 -04:00
swift-ci
d5f8d23d40 Merge remote-tracking branch 'origin/master' into master-next 2018-03-31 12:48:59 -07:00
Xi Ge
991cc77d48 migrator: teach the driver to support multiple migration script sets. (#15637)
To support migration from both Swift 3 and 4, this patch
teaches the driver to pick up the right set of migration scripts
according to the given Swift version. We also pushed some placeholder script
files for migration from Swift 4. This patch also brings the migrator
up-to-date by avoiding migration if the Swift version is already 4.2.
2018-03-31 12:37:49 -07:00
swift-ci
d9a8a02d81 Merge remote-tracking branch 'origin/master' into master-next 2018-03-30 18:08:54 -07:00
Vedant Kumar
ca27e829ba Add a transform to help test lldb expression evaluation
The initial version of the debugger testing transform instruments
assignments in a way that allows the debugger to sanity-check its
expression evaluator.

Given an assignment expression of the form:

```
  a = b
```

The transform rewrites the relevant bits of the AST to look like this:

```
  { () -> () in
    a = b
    checkExpect("a", stringForPrintObject(a))
  }()
```

The purpose of the rewrite is to make it easier to exercise the
debugger's expression evaluator in new contexts. This can be automated
by having the debugger set a breakpoint on checkExpect, running `expr
$Varname`, and comparing the result to the expected value generated by
the runtime.

While the initial version of this testing transform only supports
instrumenting assignments, it should be simple to teach it to do more
interesting rewrites.

There's a driver script available in SWIFT_BIN_DIR/lldb-check-expect to
simplfiy the process of launching and testing instrumented programs.

rdar://36032055
2018-03-30 16:50:31 -07:00
swift-ci
bead5b930a Merge remote-tracking branch 'origin/master' into master-next 2018-03-26 14:32:05 -07:00
Michael Gottesman
0bc86e095f Replace -enable-guaranteed-normal-arguments with -disable-guaranteed-normal-arguments.
rdar://38874323
2018-03-26 12:25:22 -07:00
swift-ci
f50b8130d3 Merge remote-tracking branch 'origin/master' into master-next 2018-03-25 17:09:22 -07:00
Sho Ikeda
869b6bf7d8 Merge pull request #15473 from ikesyo/frontend-using-over-typedef
[gardening][Frontend] Replace `typedef` with `using`
2018-03-26 08:57:42 +09:00
swift-ci
39976fa7d8 Merge remote-tracking branch 'origin/master' into master-next 2018-03-25 16:09:10 -07:00
Jordan Rose
02a2af60b3 [Frontend] Move the argument converter header files into lib/ (#15417)
...since they don't need to be accessed from other libraries. No
intended functionality change.
2018-03-25 16:01:23 -07:00
Sho Ikeda
f737add594 [gardening][Frontend] Replace typedef with using 2018-03-24 10:15:48 +09:00
David Ungar
3376ca741d Add frontend check to ensure that all primaries are present in the supplementary output filemap. 2018-03-22 14:57:27 -07:00
David Ungar
807dd5864e Renamed swift::types to swift::file_types. 2018-03-22 08:40:06 -07:00
David Ungar
e3535ff3d8 Merge pull request #15371 from davidungar/PR-18-11-fileMap-redo
[Batch mode] Write out filemaps for supplementary outputs.
2018-03-21 17:05:36 -07:00
Graydon Hoare
a39091161c [BatchMode] Propagate any additional YAML errors on OFM read failure 2018-03-21 14:58:54 -07:00
Jordan Rose
00361df52b Put non-frozen enum exhaustivity diagnostics behind a frontend flag
...spelled '-enable-nonfrozen-enum-exhaustivity-diagnostics'. This
is for staging purposes.
2018-03-20 10:39:02 -07:00
David Ungar
90773d298c Write out filemaps for supplementary outputs.
Add -driver-force-one-batch-repartition and enhance  batch_mode-overlong_argv test.
2018-03-20 09:42:13 -07:00
Pavel Yaskevich
fd3610b8c0 Revert "[Batch mode] Write supplementary output file map. rdar://problem/38157859" 2018-03-17 21:01:46 -07:00
David Ungar
a0cd1c57bc Merge pull request #15013 from davidungar/PR-18-11-fileMap
[Batch mode] Write supplementary output file map. rdar://problem/38157859
2018-03-16 17:38:53 -07:00
David Ungar
caf5cbd0bb Review fixes, some cosmetic, some clarifications, one for an improbable situation. 2018-03-16 13:43:37 -07:00
David Ungar
be457cb77d Error typo fix. 2018-03-14 22:36:22 -07:00
David Ungar
498366c91c Small cosmetic fixes. 2018-03-14 21:17:08 -07:00
David Ungar
3570af7476 Fixes 2018-03-12 15:40:08 -07:00
Jordan Rose
c5dcf01aca Merge pull request #14814 from jrose-apple/dump-truck
Dump (some) filelists in the PrettyStackTrace
2018-03-12 09:13:20 -07:00
David Ungar
d6a4739afd Don't create Swift option table for a diagnostic. 2018-03-11 18:02:46 -07:00
Jordan Rose
501c1fd31b Replace std::ofstream with llvm::raw_fd_ostream in -verify-apply-fixes (#15133)
This isn't a user-facing feature, but why bother using std::ofstream?
2018-03-10 16:57:41 -08:00
David Ungar
ba1a714dbe Formatting 2018-03-10 16:10:38 -08:00
David Ungar
f7b4ee00f9 OFM fixes 2018-03-09 19:57:06 -08:00
Jordan Rose
6243096b0b Dump input filelists in the PrettyStackTrace
This may help us reproduce a failing build when all we have is a build
log, and will become much more important in batch mode when we
/really/ need to know what ended up in what batch.

For now, this doesn't include /output/ filelists, because David's
about to mess with that code anyway to make things better around
supplementary outputs in batch mode. There is one weirdness there,
though, which is that ArgsToFrontendInputsConverter peeks at the
outputs to see whether we're doing single-threaded or multi-threaded
WMO.
2018-03-09 18:32:02 -08:00
Jordan Rose
c860a6067f Reorganize ArgsToFrontendInputsConverter to be more functional-style
Per a conversation with DavidU.
2018-03-09 18:24:12 -08:00
David Ungar
65267c6568 WIP 2018-03-09 15:45:38 -08:00
David Ungar
798dd7b490 Write out filemaps for supplementary outputs. 2018-03-09 13:54:44 -08:00
Jordan Rose
41286bc676 Make JSON fix-it outputs be per-primary in batch mode. (#14995)
This means moving the output path into SupplementaryOutputPaths, and
using the same sort of diagnostic dispatching that serialized
diagnostics use. This is part of what's needed to run the migrator
in batch mode.
2018-03-09 11:58:54 -08:00
Slava Pestov
a4900aea1c Frontend: Clean up duplicated logic 2018-03-06 19:42:52 -08:00
Sho Ikeda
25cdc981c7 Merge pull request #14977 from ikesyo/gardening-use-empty
[gardening] Use `empty()` over `size() == 0`
2018-03-07 09:34:26 +09:00
David Ungar
30f95f4a90 Merge pull request #14920 from davidungar/PR-18-9-batch-fix
[Batch mode]: Use first primary name for batch input file name.
2018-03-05 09:25:47 -08:00
Sho Ikeda
26d650292f [gardening] Use empty() over size() == 0 2018-03-05 14:43:13 +09:00
David Ungar
026882d090 Use first primary name for batch input file name. 2018-03-03 19:30:13 -08:00
Graydon Hoare
0cd182defc Merge pull request #14900 from jrose-apple/mux
Wire up FileSpecificDiagnosticConsumer for serialized diagnostics
2018-03-02 18:32:17 -08:00