Commit Graph

4362 Commits

Author SHA1 Message Date
swift-ci
23021d96fc Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-06 11:04:29 -08:00
Rintaro Ishizaki
cc8d4965f8 [CodeCompletion] Ensure cached results have 'unknown' type relation 2020-02-05 17:05:23 -08:00
Rintaro Ishizaki
c31bfaeeed [CodeCompletion] Introduce 'Unknown' type relation
Now

* NotApplicable: The result is not relevant for type relation (e.g.
  keywords, and overloads)
* Unknown: the relation was not calculated (e.g. cached results), or the
  context type is unknown.
* Invalid: The result type is invalid for this context (i.e. 'Void' for
  non-'Void' context)
* Unrelated: The result type has no relation to the context type
* Convertible: The result type is convertible to the context type
* Identical: The result type is identical to the context type
2020-02-05 14:23:59 -08:00
Rintaro Ishizaki
17abedf1ef [CodeCompletion] Introduce 'NotApplicable' type relation
For keywords, and overrides.
2020-02-05 14:23:59 -08:00
swift-ci
895294a7d1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-05 11:03:43 -08:00
Rintaro Ishizaki
c722b1aa5b Merge pull request #29624 from rintaro/sourcekit-typerelation-rdar59066560
[SourceKit] Expose 'ExpectedTypeRelation' for the completion results
2020-02-05 10:51:09 -08:00
swift-ci
f4db2980ab Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-05 10:04:39 -08:00
AG
ff9d3ef073 Merge pull request #29568 from bitjammer/acgarland/rdar-59055039-ssg-pass-xcc
Pass -Xcc flags through swift-symbolgraph-extract
2020-02-05 09:48:51 -08:00
AG
307a2f07e3 Merge pull request #29566 from bitjammer/acgarland/rdar-58770554-ssg-arg-polish
swift-symbolgraph-extract: Mark required args
2020-02-05 09:47:56 -08:00
swift-ci
bc7bebadc9 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-02-04 08:02:45 -08:00
Daniel Rodríguez Troitiño
713e6360e6 Merge pull request #29454 from buttaface/skd-test
[sourcekitd-test] Remove LLVM Core static library that is getting linked twice
2020-02-04 07:56:01 -08:00
Rintaro Ishizaki
1e74c39956 [SourceKit] Expose ExpectedTypeRelation for the completion results
So that clients can sort the results using this.

rdar://problem/59066560
2020-02-03 15:57:43 -08:00
Vlasov Anton
904bd0bf63 SR-5740 Refactoring action to convert if statement to switch 2020-02-02 12:44:48 +03:00
Ashley Garland
7030301ae1 Pass -Xcc flags through swift-symbolgraph-extract
rdar://problem/59055039
2020-01-31 13:39:45 -08:00
Ashley Garland
81b4d84ee9 swift-symbolgraph-extract: Mark required args
- Mark required arguments
- Print help usage on zero args

rdar://problem/58770554
2020-01-31 13:38:50 -08:00
swift-ci
ba49f06221 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-30 17:03:10 -08:00
Alex Hoppen
cb26625f5d [sourcekitd] Send a notification when semantic functionality is enabled again 2020-01-30 15:47:13 -08:00
Rintaro Ishizaki
e121cb09cd Revert "[SourceKit] Disable module system headers validation"
This reverts commit 951b85359a.
2020-01-30 15:04:07 -08:00
Butta
1d747bc351 [sourcekitd-test] Remove redundant LLVMCore static library
This library is already supplied by the LLVM CMake config, so adding it here
sometimes causes the CommandLine option parser to fail, as it registers the
same option twice.
2020-01-29 11:32:37 +05:30
swift-ci
0373bc26c1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-28 08:03:20 -08:00
Saleem Abdulrasool
a1c971907b build: repair the Windows build
This should repair the Windows build after #29451.  The quoting
behaviour was incorrect and was constructing an invalid compiler
invocation.  Solve the issue by using `target_include_directories`
instead.  However, since this needs the target, hoist the flag
computation to the local sites.  This replicates more logic because of
the custom build trying to replicate the CMake build logic in CMake.
2020-01-27 22:35:28 -08:00
swift-ci
8c23dec23e Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 09:04:20 -08:00
Saleem Abdulrasool
efa526ea71 Merge pull request #29451 from compnerd/someone-else-can-do-it
build: use modern target property handling
2020-01-27 08:49:20 -08:00
swift-ci
26ab9840a4 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-26 09:03:30 -08:00
Saleem Abdulrasool
729ad36b80 build: delegate rpath handling to CMake
This moves the rpath handling to the build system rather than trying to
figure out the correct flags to pass to the driver.
2020-01-25 17:01:07 -08:00
Saleem Abdulrasool
d8b3b626fe build: use modern target property handling
Use specific operations for setting the compile flags, link flags,
linked libraries, and library search paths.  This allows us to use CMake
more effectively, simplifies the logic, and will ensure that flags are
not duplicated.
2020-01-25 16:08:51 -08:00
swift-ci
ca63366ce1 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-24 14:04:24 -08:00
Ben Langmuir
78d72438b3 Merge pull request #29437 from benlangmuir/modules-woes
[sourcekitd-test] When setting -fmodules-cache-path also set -fmodules
2020-01-24 13:59:12 -08:00
Ben Langmuir
f8ebc98483 [sourcekitd-test] When setting -fmodules-cache-path also set -fmodules
When doing header interface generation, we interpret clang command-line
arguments in `initInvocationByClangArguments` and attempt to setup a
matching Swift compiler invocation. One important argument is the module
cache, but clang will only interpret `-fmodules-cache-path` if modules
are enabled (typically with `-fmodules`). While the header itself might
not need modules, Swift will import its own shims module and during
testing this needs to honour lit's provided cache. So we add -fmodules
in sourcekitd-test anytime we add -fmodules-cache-path.

rdar://58836540
2020-01-24 11:45:23 -08:00
swift-ci
6238289313 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-24 10:24:34 -08:00
Meghana Gupta
5285bf7200 Turn off speculative devirtualization by default. (#29359)
Turn off speculative devirtualization by default. Add a flag to support enabling the pass.
Fixes rdar://58778959 and rdar://58429282
2020-01-24 10:23:06 -08:00
Mike Ash
cd2b54f74e Merge branch 'master' into master-rebranch 2020-01-24 11:30:32 -05:00
Saleem Abdulrasool
d3f72155d8 Merge pull request #29399 from compnerd/sk-rpath
build: move the RPATH handling to the executables
2020-01-24 08:19:27 -08:00
Saleem Abdulrasool
9d8d013ade Merge pull request #29383 from compnerd/exclude-exclusion
build: remove support for `EXCLUDE_FROM_ALL` (NFC)
2020-01-24 08:17:45 -08:00
Saleem Abdulrasool
04affa2b9f build: use the new libedit imported library
Use the imported library to track header search path and library search
paths and dependencies rather than replicating that knowledge.
2020-01-23 14:24:06 -08:00
Saleem Abdulrasool
bc21d4ff46 build: move the RPATH handling to the executables
This moves the handling of the RPATH and the exported symbol to the
binary themselves.  The exported symbol is needed due to the use of the
exported symbol list.  This makes the small difference that `_main` is
always exported on Darwin which is not strictly needed in ASAN as ASAN
provides the entry point.

The RPATH is only setup on installation which is sufficient for testing
purposes as CMake ensures that the libraries are fully linked and will
be loaded properly when run from the build tree.
2020-01-23 13:38:22 -08:00
Saleem Abdulrasool
1f961414a5 build: remove support for EXCLUDE_FROM_ALL (NFC)
This parameter is unused.  Simply remove the option from the
`add_swift_sourcekit_executable`.
2020-01-23 12:44:28 -08:00
swift-ci
4ce207c556 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-23 10:44:28 -08:00
David Zarzycki
3a7d87b4ed [CMake] Fix missing linker deps when using BUILD_SHARED_LIBS 2020-01-23 09:40:56 -05:00
swift-ci
d31da5d08d Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 14:03:45 -08:00
Ben Langmuir
a989b8a978 Merge pull request #29357 from benlangmuir/lit-subst-mcp-sourcekit
[sourcekit] Add global -module-cache-path to test executables
2020-01-22 13:45:56 -08:00
Ben Langmuir
8b8ec5372e [sourcekit] Add global -module-cache-path to test executables
Add a global -module-cache-path option to `sourcekitd-test` and
`complete-test` and have lit provide the default module cache in its
substitutions. Previously many tests have explicitly provided the
`%mcp_opt` option, but this is easy to forget when writing new tests.

The module cache is inserted into the compiler arguments at the
beginning so that it's still possible for a test to override it with a
per-test cache if desired.

rdar://58752842
2020-01-22 11:04:52 -08:00
swift-ci
11550b4c0c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 09:43:43 -08:00
Varun Gandhi
f6643af650 [Printer] Update printSIL to make sure LLDB doesn't break.
For more context, see:
1. https://github.com/apple/swift/pull/29239 - original PR which introduced
   the change, including an LLDB-side change.
2. The immediately preceding commit, which reverted this change.
3. https://github.com/apple/swift/pull/29350 which revealed some breakage
   caused by the changes in PR 29239 (unrelated to printing).
2020-01-22 09:05:39 -08:00
Varun Gandhi
d9a7a7d49e Revert "[Printer] Conditionally print Clang types in emitted SIL."
This reverts commit a27c5f0a16.
2020-01-22 09:04:52 -08:00
Erik Eckstein
bbfaccda4b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-22 08:25:23 +01:00
Devin Coughlin
082421048a [AST/Sema] Add availability attributes for macCatalyst
Add a platform kind and availability attributes for macCatalyst. macCatalyst
uses iOS version numbers and inherits availability from iOS attributes unless
a macCatalyst attribute is explicitly provided.
2020-01-21 20:27:14 -08:00
swift-ci
e28c558c72 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-21 09:43:46 -08:00
Varun Gandhi
a27c5f0a16 [Printer] Conditionally print Clang types in emitted SIL.
Hopefully, this helps us debug Clang type mismatches better.
2020-01-17 16:22:39 -08:00
Erik Eckstein
1b312a85bd Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-16 10:39:20 +01:00