Commit Graph

393 Commits

Author SHA1 Message Date
Saleem Abdulrasool
2e7c328077 Merge pull request #24168 from xiaobai/sink_component_arg
[CMake] Modify swift_install_in_component to support cmake install components
2019-04-30 21:06:32 -07:00
Jordan Rose
f4487881e4 Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what
version of Swift you were running. Usually that can be gleaned from
the path, but not always.
2019-04-24 15:53:56 -07:00
Alex Langford
3d9a28925b [CMake] Modify swift_install_in_component to support cmake install components
CMake supports the notion of installation components. Right now we have some
custom code for supporting swift components. I think that for installation
purposes, it would be nice to use the CMake component system.

This should be a non-functional change. We should still only be generating
install rules for targets and files in components we want to install, and we
still use the install ninja target to install everything.
2019-04-19 14:06:11 -07:00
David Ungar
44daa88ebd Format 2019-04-03 12:53:31 -07:00
David Ungar
9cc3a4a9d8 Rename defaultDiagnosticLoc to bufferIndirectlyCausingDiagnostic. 2019-04-03 12:52:49 -07:00
David Ungar
c139c5909a Pass defaultDiagnosticLoc to handleDiagnostic, not currentPrimaryInput. 2019-04-02 22:27:55 -07:00
David Ungar
7a0e0ffc8a Store current primary in diagnostic engine, pass it down via handleDiagnostic. Unformmated. 2019-04-02 00:43:28 -07:00
Jason Mittertreiner
24c10fe8f7 Fix Response Files on Windows (#22985)
This prevents response files on Windows from being overridden after they
are read.
2019-03-01 19:03:46 -08:00
Jordan Rose
a23eaf4a02 Remove API notes compilation support from swiftc (#21759)
We don't use this feature anymore (see 0149129ed), and now that we've
branched Swift 5.0 for the last time it's time to rip it out of swiftc
(and then from Clang).

No functionality change, unless someone was compiling their own API
notes. If you were doing that, just copy them into place as text.
2019-01-16 10:39:39 -08:00
Argyrios Kyrtzidis
66be4a58b4 [Parser] Introduce ParserUnit::parse() function to avoid duplication of code 2018-12-16 09:52:15 -08:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Saleem Abdulrasool
dd85d79105 tools: use target_link_libraries like clang (NFC)
Rather than using the `LINK_LIBRARIES` option, use target_link_libraries
like clang does.  Because these are all host tools, there is no name
mangling done for the libraries making this a no-op change.
2018-11-16 17:43:06 -08:00
Saleem Abdulrasool
e3e4d1ba0b tools: remove unnecessary LLVM_COMPONENT linkage
Remove the unncessary link against the DebugInfoCodeView component.  THe tools
seem to build without the dependency.  The dependency issue in the linkage
seems to have been resolved.
2018-11-14 18:29:19 -08:00
Jordan Rose
f3ea8bdd55 [Serialization] Preparation for giving swiftdoc its own version
The functionality change in this commit is that the control block in a
swiftdoc file is validated rather than just being ignored. Tests in
following commit.
2018-10-23 19:55:44 -07:00
Argyrios Kyrtzidis
7bef73313f [swift-format] Fix issue with swift-format invocation re-using source buffers from previous iterations
rdar://39260564
2018-10-12 08:55:40 -07:00
Xi Ge
b4356d4f93 Merge pull request #19104 from nkcsgexi/parser-laziness
Parser: lazily parse members in extension decls.
2018-09-06 15:24:17 -07:00
Xi Ge
24b0eac9a4 Parser: parse members in extension decls incrementally. 2018-09-05 17:00:39 -07:00
Saleem Abdulrasool
5931d96d96 build: repair the swift component installation for cross-compilation
When compiling the swift compiler from Linux to Windows, the
CMAKE_EXECUTABLE_SUFFIX is set to `.exe`.  The tool symlinks and the tools are
generated with the suffix, however, the installation does not honour the suffix,
failing to install the component.
2018-09-05 14:29:40 -07:00
Bob Wilson
ca10ed04a6 [master-next] Remove unnecessary argument array copy from PR 17494 2018-07-03 17:26:14 -07:00
swift-ci
4d15dc1dad Merge remote-tracking branch 'origin/master' into master-next 2018-06-29 17:29:11 -07:00
Doug Gregor
a6f46584ec [Evaluator] Indirect evaluation of uncached requests through a separate table.
The bundling of the form of a request (e.g., the storage that makes up a request)
with the function that evaluates the request value requires us to perform
ad hoc indirection to address the AST —> Sema layering violation. For
example, ClassDecl::getSuperclass() calls through the LazyResolver (when
available) to form the appropriate request. This means that we cannot
use the the request-evaluator’s cache when LazyResolver is null, forcing
all cached state into the AST.

Provide the evaluator with a zone-based registration system, where each
request “zone” (e.g., the type checker’s requests) registers
callbacks to evaluate each kind of request within that zone. The
evaluator indirects through this table of function pointers, allowing
the request classes themselves to be available at a lower level (AST)
than the functions that perform the computation when the value isn’t
in the cache (e.g., Sema).

We are not taking advantage of the indirection yet; that’ll come in a
follow-up commit.
2018-06-29 15:41:55 -07:00
Bob Wilson
397ace0ac6 [master-next] NFC: Rename variable from PR #17494
Jordan reviewed my change and suggested using a better variable name
to avoid potential confusion between "args" and "argv".
2018-06-25 23:43:13 -07:00
Bob Wilson
ad9098fca0 [master-next] Fix up the driver's use of PROGRAM_START after PR #16362
On the master-next branch, the InitLLVM class used by the PROGRAM_START
macro can modify the argc/argv values (currently only on Windows).
Expanding response files before initializing the stack trace also modifies
the arguments so use a separate SmallVector for each copy of the argument
vector.
2018-06-25 17:01:01 -07:00
Bob Wilson
44712233c3 Merge remote-tracking branch 'origin/master' into master-next 2018-06-21 23:36:03 -07:00
Jordan Rose
7d8e40b0bb Merge pull request #16362 from dabelknap/frontend_responsefile
Wrap Command Line Arguments in a Response File if System Limits are Exceeded

https://bugs.swift.org/browse/SR-4517
2018-06-21 16:31:20 -07:00
Austin Belknap
be229fc173 Use subCommandArgs instead of argv within subcommand if block. 2018-06-20 15:24:37 -07:00
Austin Belknap
8e6abee651 Pass ArrayRefs by value. 2018-06-12 18:00:30 -07:00
Austin Belknap
6592b428f8 Style fixes. 2018-06-01 14:18:26 -07:00
Austin Belknap
3b38fa68a1 Preserve argv for the stack trace, and only create a copy if necessary. 2018-06-01 14:01:11 -07:00
swift-ci
6bcc013437 Merge remote-tracking branch 'origin/master' into master-next 2018-05-30 00:49:45 -07:00
Robert Widmann
d7493dd0fa [NFC] Expose the TaskQueue as a Compilation Parameter
Shuffle the responsibility for creating the TaskQueue out of the
Compilation's internal job state object and into the driver.  Expose
a builder convenience function that handles the argument parsing.
2018-05-29 21:58:27 -07:00
Austin Belknap
3fe62b94e7 Reformat verbose and stack trace printouts for response-files. 2018-05-23 11:05:20 -07:00
swift-ci
0563dd0164 Merge remote-tracking branch 'origin/master' into master-next 2018-05-10 13:09:08 -07:00
David Zarzycki
f0c106c0e3 [AST] NFC: Avoid pointer indirection with ASTContext Impl storage
Most of this change is mechanical: `Impl` -> `getImpl()`.
2018-05-10 05:50:56 -04:00
swift-ci
14f017468d Merge remote-tracking branch 'origin/master' into master-next 2018-05-02 17:09:37 -07:00
Jordan Rose
a214f0b39b Fix call to llvm::opt::OptionTable::PrintHelp (#16269)
The signature here changed, but the old arguments implicitly converted
to the parameter types for the wrong overload, so we didn't notice.
Add a simple test that would have at least caught this for the driver.
2018-05-02 16:54:10 -07:00
Saleem Abdulrasool
6b18cfe53f master-next: update for SVN r330216
sys::Process::GetArgumentVector has been removed.  It is unclear if it
was ever needed in the first place.  Simplify the code to avoid the use.
2018-04-23 11:24:02 -07:00
Austin Belknap
0e5f88c5ad Elaborate on the purpose of response files. 2018-04-18 09:54:59 -07:00
Austin Belknap
a7fe02e0c5 Add ability to expand response files from the command line. 2018-04-10 12:41:25 -07:00
swift-ci
36b254df94 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-03-08 01:58:15 -08:00
Sho Ikeda
cea6c03eb2 [gardening] Use !empty() over size() > 0 2018-03-08 09:21:09 +09:00
swift-ci
9e935e1a9e Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-28 20:00:51 -08:00
Jordan Rose
3cd9f166bc Don't spend time initializing LLVM when running the driver (#14896)
Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
2018-02-28 19:56:19 -08:00
swift-ci
e8d88d9fd4 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-21 11:38:59 -08:00
Jordan Rose
098a1c98f8 Stop importing SILModule.h in Frontend.h
...for no other reason than to slightly improve compile times
when something changes in SILModule.h or SILFunction.h.
2018-02-20 17:50:50 -08:00
swift-ci
b45ac7f2c8 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-02-13 16:37:59 -08:00
Xi Ge
37f352fe41 sourcekitd: build Swift syntax tree more lazily than collecting parsed tokens. (#14578)
Before this patch, we have one flag (KeepSyntaxInfo) to turn on two syntax
functionalities of parser: (1) collecting parsed tokens for coloring and
(2) building syntax trees. Since sourcekitd is the only consumer of either of these
functionalities, sourcekitd by default always enables such flag.
However, empirical results show (2) is both heavier and less-frequently
needed than (1). Therefore, separating the flag to two flags makes more
sense, where CollectParsedToken controls (1) and BuildSyntaxTree
controls (2).

CollectingParsedToken is always enabled by sourcekitd because
formatting and syntax-coloring need it; however BuildSyntaxTree should
be explicitly switched on by sourcekitd clients.

resolves: rdar://problem/37483076
2018-02-13 16:27:12 -08:00
swift-ci
5ac8e5a0a1 Merge remote-tracking branch 'origin/master' into master-llvm-swift5-transition 2018-01-24 13:56:54 -08:00
Graydon Hoare
d139ab2968 [BatchMode] Expand lifetime of ToolChain, pass reference to it to Compilation. 2018-01-24 10:31:19 -08:00
swift-ci
dd694cb1ca Merge remote-tracking branch 'origin/master' into master-next 2017-12-11 20:49:53 -08:00