Commit Graph

1199 Commits

Author SHA1 Message Date
Mishal Shah
b8866006c3 Revert "[FrontEnd] Pretty stack trace indicating running user code" 2019-11-19 15:37:58 -08:00
swift_jenkins
96e95791e8 Merge remote-tracking branch 'origin/master' into master-next 2019-11-19 10:39:18 -08:00
swift_jenkins
b9f998ffa4 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 15:56:48 -08:00
Tapan Thaker
f2f521f8bf [FrondEnd] Wrap RunInmediately() in a pretty stack trace indicating we are running user code 2019-11-15 07:29:29 -08:00
David Ungar
742c3985bd Source-range-based dependencies
Frontend outputs source-as-compiled, and source-ranges file with function body ranges and ranges that were unparsed in secondaries.
Driver computes diffs for each source file. If diffs are in function bodies, only recompiles that one file. Else if diffs are in what another file did not parse, then the other file need not be rebuilt.
2019-11-12 20:41:02 -08:00
Tony Allevato
3c45041b17 Add driver modes to emit and dump Clang precompiled modules. 2019-11-11 15:00:51 -08:00
swift-ci
03eeaf3a4b Merge remote-tracking branch 'origin/master' into master-next 2019-11-01 17:29:49 -07:00
Varun Gandhi
0f277aca15 [Frontend] Avoid crashing in trace emission due to "duplicate" swiftinterfaces. 2019-11-01 11:26:51 -07:00
swift-ci
667e89279a Merge remote-tracking branch 'origin/master' into master-next 2019-10-30 17:09:44 -07:00
Harlan Haskins
fb89229520 Merge pull request #27970 from harlanhaskins/let-me-speak-to-your-mangler
[TBDGen] Add the unmangled name to the IR-not-TBD diff list
2019-10-30 16:55:05 -07:00
swift-ci
ae278ae961 Merge remote-tracking branch 'origin/master' into master-next 2019-10-30 14:50:00 -07:00
Harlan Haskins
7ca3876519 [TBDGen] Add the unmangled name to the IR-not-TBD diff list
In c94b952 I accidentally started adding StringRefs to an outer-scope
vector from a local SmallString instead of the ones that lived in the IR
module I was reading from. Instead, put the original symbol name from
the IR instead of the "mangled" (leading _ variant) into the diff list.
2019-10-30 14:26:19 -07:00
Owen Voorhees
8a6711769e [Diagnostics] Refactor DiagnosticConsumer interface
DiagnosticInfo now holds all the information needed to consume
a diagnostic, so remove unneeded parameters from handleDiagnostic.
2019-10-29 13:52:12 -07:00
Xi Ge
64c0680686 Merge remote-tracking branch 'apple/master' into master-next 2019-10-28 10:19:36 -07:00
Harlan Haskins
e69fa3bcf5 Merge pull request #27746 from harlanhaskins/away-in-a-mangler
[TBDGen] Mangle symbols before putting them in the TBD
2019-10-17 14:23:03 -07:00
Varun Gandhi
ab1381a808 [Frontend] Weaken validation when emitting a trace. (#27737)
Fixes rdar://problem/56333192.
2019-10-17 09:32:10 -07:00
Harlan Haskins
c94b952a54 [TBDGen] Mangle symbols before putting them in the TBD
The linker expects to see mangled symbols in the TBD, otherwise it won't
be able to link anything. Use LLVM's mangler to mangle them.

Fixes rdar://54055049
2019-10-16 18:50:54 -07:00
Varun Gandhi
903add2c3f [Frontend] Make the module trace emission more robust.
✔ More informative error messages in case of crashes.
✔ Handling and documenting different cases.
✔ Test cases for different cases.
✔ Make SDKDependencies.swift pass again.
2019-10-15 15:44:26 -07:00
swift-ci
da686f2aa7 Merge remote-tracking branch 'origin/master' into master-next 2019-10-09 17:09:31 -07:00
Jordan Rose
7b0d081965 Remove IteratorRange in favor of llvm::iterator_range
Now that llvm::iterator_range has 'empty', there's not enough reason to
keep our own version of it in the Swift repo.

No functionality change.
2019-10-08 11:23:28 -07:00
swift-ci
31004db03c Merge remote-tracking branch 'origin/master' into master-next 2019-10-03 18:29:24 -07:00
Slava Pestov
55a6693da8 Frontend: -emit-silgen exits with non-zero status code if a diagnostic was emitted 2019-10-03 17:11:44 -04:00
swift-ci
abcec82ca5 Merge remote-tracking branch 'origin/master' into master-next 2019-09-22 19:30:00 -07:00
David Ungar
c25de6af75 Merge pull request #27221 from davidungar/A-9-17-astscope-off
[NFC, NameLookup, ASTScope] Bug fix for eager scope tree construction & better failure messages
2019-09-22 19:10:58 -07:00
David Ungar
3c891f9532 Fully eager for printing, just eager enough for type-checking. 2019-09-22 17:59:40 -07:00
swift-ci
a453eda2dc Merge remote-tracking branch 'origin/master' into master-next 2019-09-18 10:09:53 -07:00
Jordan Rose
8d7f1b7c5d [AST] Separate SourceFile from FileUnit.h
Like the last commit, SourceFile is used a lot by Parse and Sema, but
less so by the ClangImporter and (de)Serialization. Split it out to
cut down on recompilation times when something changes.

This commit does /not/ split the implementation of SourceFile out of
Module.cpp, which is where most of it lives. That might also be a
reasonable change, but the reason I was reluctant to is because a
number of SourceFile members correspond to the entry points in
ModuleDecl. Someone else can pick this up later if they decide it's a
good idea.

No functionality change.
2019-09-17 17:54:41 -07:00
Jordan Rose
853caa66d4 [AST] Split FileUnit and its subclasses out of Module.h
Most of AST, Parse, and Sema deal with FileUnits regularly, but SIL
and IRGen certainly don't. Split FileUnit out into its own header to
cut down on recompilation times when something changes.

No functionality change.
2019-09-17 17:54:41 -07:00
swift-ci
6e2d90770c Merge remote-tracking branch 'origin/master' into master-next 2019-09-17 09:09:58 -07:00
Jordan Rose
94265e8163 [Frontend] Add a comment about 9e6d4db (#27169)
With wording help from David U.
2019-09-17 09:05:23 -07:00
swift-ci
0c440ff5ef Merge remote-tracking branch 'origin/master' into master-next 2019-09-13 20:49:32 -07:00
Harlan Haskins
c82c9b8210 [ModuleInterfaces] Remove references to 'parseable' interfaces everywhere
Now that we've settled on Module Interface as the name, let's remove the
vestiges of "Parseable Interfaces"
2019-09-13 14:55:48 -07:00
Harlan Haskins
fafc5832fe [ModuleInterfaces] ParseableInterfaceModuleLoader -> ModuleInterfaceLoader
Rename this class to better fit the user-facing name.
2019-09-13 13:40:01 -07:00
swift-ci
cdffb88fe8 Merge remote-tracking branch 'origin/master' into master-next 2019-09-12 18:10:45 -07:00
Jordan Rose
9e6d4db6d0 [Frontend] Avoid doing whole-module work under primary-file typecheck (#27153)
...a situation we get into with indexing. The way Xcode generates
indexing invocations is to take a build command and add additional
flags to it; in order for the Driver to produce a single frontend
command from /that/, it currently plans as if it's going to do a
whole-module -typecheck and then turns around and uses -primary-file
anyway. This is questionable practice, to be sure...

...but meanwhile, let's not crash by trying to access declarations
that haven't been type-checked yet.

rdar://problem/53117124
2019-09-12 17:53:06 -07:00
Mike Ash
f5e7ab866c Merge branch 'master' into master-next 2019-09-09 12:11:25 -04:00
Slava Pestov
859b37e782 Frontend: Only build and generate a single SILModule at a time
Instead of SILGen'ing all primary files before we go on to optimize
and IRGen them, run each file to completion before starting the next
one. This reduces memory usage.
2019-09-06 21:50:15 -04:00
Slava Pestov
01e65e18c4 SIL: Share TypeConverter between SILModules in batch mode 2019-09-06 21:50:15 -04:00
swift-ci
f4374ed77c Merge remote-tracking branch 'origin/master' into master-next 2019-09-03 09:49:53 -07:00
Varun Gandhi
4bd7a89bd6 Skip module trace emission if we encountered errors when compiling.
Fixes rdar://problem/54860311.
2019-08-30 16:14:18 -07:00
Arnold Schwaighofer
20efacf2d6 Merge remote-tracking branch 'upstream/master' into master-next 2019-08-26 13:30:41 -07:00
Jordan Rose
d8c823e159 Module trace: explicitly ignore the main module
I'm not sure why this wasn't already broken, but with the changes in
the next commit the multifile module trace test fails complaining that
it can't get a path for the main module. But we don't /need/ a path
for the main module because it's not a dependency of itself.
2019-08-23 17:40:45 -07:00
Jonas Devlieghere
b4d268e9e1 Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -07:00
swift-ci
032def3316 Merge remote-tracking branch 'origin/master' into master-next 2019-08-14 11:50:24 -07:00
Adrian Prantl
c08a62764a Move DWARFImporterDelegate into ClangImporter and remove DWARFImporter.
This refactors DWARFImporter to become a part of ClangImporter, since
it needs access to many of its implementation details anyway. The
DWARFImporterDelegate is just another mechanism for deserializing
Clang ASTs and once we have a Clang AST, the processing is effectively
the same.
2019-08-14 10:28:50 -07:00
Slava Pestov
6248628961 Merge remote-tracking branch 'origin/master' into master-next 2019-08-09 15:51:48 -04:00
David Ungar
f64033a2d2 Manual rebase with master 2019-08-06 22:13:20 -07:00
swift-ci
25a82d2273 Merge remote-tracking branch 'origin/master' into master-next 2019-07-24 15:09:59 -07:00
Varun Gandhi
0205a10998 Add information on direct imports and library evolution to trace file.
Pending: support for tracking depedencies through -import-underlying-module
and -import-objc-header.

Fixes rdar://problem/51825495 and rdar://problem/51825644.
2019-07-23 16:25:41 -07:00
swift-ci
7f46a4a7fb Merge remote-tracking branch 'origin/master' into master-next 2019-07-22 16:10:11 -07:00