Commit Graph

3682 Commits

Author SHA1 Message Date
Nathan Hawes
2964b58699 Merge pull request #20055 from nathawes/r45273748-speculative-fix-for-asan-bot-sourcekit-failures
[sourcekit] Fix for Ubuntu 16.04 Swift ASAN bot sourcekitd-test failures
2018-11-08 22:29:27 -08:00
Slava Pestov
f49e0ba330 AST: Remove unused DeclContext and GenericEnvironment from mangling 2018-11-09 00:44:29 -05:00
Bruno Rocha
6f1f1bda92 [SourceKit] Recognize static method operators 2018-11-08 12:33:06 -02:00
Nathan Hawes
15dd6f920a [sourcekit] Fix for Ubuntu 16.04 Swift ASAN bot failures
Don't mix and match between the just-built clang and the host clang when
ASAN is enabled.

rdar://problem/45273748
2018-11-07 17:29:13 -08:00
swift-ci
094b749b40 Merge pull request #16914 from compnerd/fork 2018-11-07 13:50:32 -08:00
Nathan Hawes
23d461d652 [SourceKit] Expose the data variant sourcekitd apis in the SwiftLang wrapper
These were recently added to support returning the SyntaxTree in the bytetree
from SourceKit but were never added in SwiftLang (the Swift layer wrapping
SourceKit).
2018-11-06 14:27:00 -08:00
Nathan Hawes
fd2c35e757 [SourceKit] Make each Variant keep a strong reference to its SourceKitdResponse context
sourcekitd_variant_t is only safe to use while the sourcekitd_response_t it was
retrieved from is still alive, so keep a strong reference to SourceKitdResponse
(the Swift wrapper of sourcekitd_response_t) in each Variant (the Swift wrapper
of sourcekitd_variant_t).
2018-11-06 13:19:34 -08:00
Saleem Abdulrasool
43f04eeb29 Merge pull request #20316 from compnerd/reflection-dump
build: always build swift-reflection-dump
2018-11-04 20:22:52 -08:00
Saleem Abdulrasool
cdf0d19254 build: always build swift-reflection-dump
We always build swiftReflection now for the tools which allows us to
always build this tool.
2018-11-04 12:12:07 -08:00
Argyrios Kyrtzidis
4d7ee807da [sourcekitd] Make sure to put '-resource-dir' argument in front to allow overriding it by the passed in arguments
Otherwise, passing a custom '-resource-dir' option will be ignored.
rdar://45764554
2018-11-03 21:55:50 -07:00
Slava Pestov
9c50867370 Move RemoteAST's RemoteASTTypeBuilder to lib/AST/ASTDemangler.cpp 2018-11-02 18:19:40 -04:00
Saleem Abdulrasool
b2b8048b3f build: split out host and target library builds fully
Remove this special case handling for building a host library as a target
library.  This is the last piece needed to support cross-compiling lldb.  As a
bonus, it cleans up some of the logic in our special build system.
2018-10-30 10:56:14 -07:00
Saleem Abdulrasool
24dd1739d4 swift-stdlib-tool: switch to add_swift_host_tool
This tool is only built for the host.  Use the add_swift_host_tool
function instead.  NFCI.
2018-10-29 11:53:29 -07:00
Michael Gottesman
3f17bb6ddf Carefully split the build's invocation of add_swift_library into host/target variants.
The key thing here is that all of the underlying code is exactly the same. I
purposely did not debride anything. This is to ensure that I am not touching too
much and increasing the probability of weird errors from occurring. Thus the
exact same code should be executed... just the routing changed.
2018-10-27 12:58:51 -07:00
Xi Ge
8c0495f467 swift-module-digester: drop isSDKPrivate() from node since filtering should happen at AST level. 2018-10-25 17:41:28 -07:00
Xi Ge
49c16922dd swift-module-digester: diagnose type witness type changes when checking ABI stability. 2018-10-25 16:40:23 -07:00
Xi Ge
fcc4bf5be2 swift-module-digester: don't blindly include initializer decls. rdar://45418572 2018-10-25 15:14:17 -07:00
Xi Ge
da4fc05a0e swift-module-digester: model ProcotolConformance as a standalone node.
Modeling ProtocolConformance as a standalone node allows us to keep
track of all type witnesses and re-use existing matching algorithm
to diagnose type witness changes.
2018-10-25 15:14:17 -07: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
Saleem Abdulrasool
2f8a4dbf4a Merge pull request #19933 from compnerd/micro-opt
SourceKit: micro-optimization of CMake (NFC)
2018-10-19 14:58:20 -07:00
Saleem Abdulrasool
13c83b121e SourceKit: always install headers
Ensure that we install the client header for the InProc sourcekitd. This is
needed to actually make it usable. With this, it is now possible to develop
against SourceKit on Linux and Windows.
2018-10-17 15:01:27 -07:00
Saleem Abdulrasool
8395e355e5 SourceKit: micro-optimization of CMake (NFC)
Set all the target properties in a single shot.  This avoids the multiple string
parsing within CMake.  Although this makes no noticable differnce, it is
slightly more efficient and also colocates all the target properties.
2018-10-17 14:53:24 -07:00
Ben Langmuir
98ceebe6e8 Add dependency on the libdispatch-install step
Libraries in sourcekitd depending on the external libdispatch project
appear to only depend on the *build* step, but really need the install
to happen as well since we are linking to the installed location.
2018-10-16 15:56:00 -07:00
Slava Pestov
8954e5f3c8 Merge pull request #19891 from slavapestov/unqualified-lookup-fixes-part-2
Unqualified lookup fixes, part 2
2018-10-15 23:02:19 -07:00
swift-ci
7cd273e777 Merge pull request #19904 from nkcsgexi/redirect-diags 2018-10-15 20:06:13 -07:00
Slava Pestov
7c6a6bd724 swift-api-digester: Minor typos 2018-10-15 19:24:27 -07:00
Slava Pestov
91fc404d4f swift-api-digester: Don't desugar type aliases all the way 2018-10-15 19:24:27 -07:00
Slava Pestov
5e7a289877 swift-api-digester: Subscripts don't have storage 2018-10-15 19:24:27 -07:00
Slava Pestov
ba066b8257 swift-api-digester: Don't drop value ownership when parameter has typealias type 2018-10-15 19:24:27 -07:00
Xi Ge
70118d4db0 swift-module-digester: output ABI/API diagnostics to a path instead of stdout.
This is handy for scripts.
2018-10-15 19:12:34 -07:00
Saleem Abdulrasool
c20a7550d4 build: correct case for compiler id
The STREQUAL would fail as the C in Clang for the compiler ID is capital.
Correct the case.
2018-10-15 16:20:59 -07:00
Saleem Abdulrasool
ed3cb02475 build: use the host compiler if possible (#19888)
Attempt to use the host compiler when building libdispatch for SourceKit.  This
is needed for cross-compiling scenarios (e.g. building the Windows toolchain on
Linux).  However, unfortunately, the Ubuntu 14.04 build bots are using an
ancient compiler, so we cannot use that for building libdispatch.  Add a
fallback to the just built clang.  Ensure that the fallback only activates when
compiling on the same host as the target.
2018-10-15 15:13:45 -07:00
Xi Ge
715d481333 swift-module-digester: remove unused clang importer flag specialization. 2018-10-14 23:10:28 -07:00
Argyrios Kyrtzidis
f913a239f8 [SourceKit] Avoid the 'error: no input files' diagnostic notification for syntactic-only requests
rdar://44989868
2018-10-13 09:48:00 -07:00
Argyrios Kyrtzidis
feffd2c5d4 [sourcekitd] In the fatal error handler, don't call abort() if gen_crash_diag is false
rdar://44046820
2018-10-13 07:34:56 -07:00
Nathan Hawes
b1c8013701 Merge pull request #19782 from nathawes/incremental-parsing-bug
[incrParse] Fix bug mapping a node's location back to its location in the cached syntax tree
2018-10-12 15:43:11 -07:00
Ross Bayer
c1f17f00c2 Changed the external project build for libdispatch in tools/SourceKit to use the just-build clang and clang++ rather than the system versions (rdar://45148295). (#19845) 2018-10-12 14:53:04 -07:00
Argyrios Kyrtzidis
0030a77557 Merge pull request #19856 from akyrtzi/swift-format-fix
[swift-format] Fix issue with swift-format invocation re-using source buffers from previous iterations
2018-10-12 10:11:38 -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
Nathan Hawes
9003d83ffe [gardening] convert ByteBasedSourceRange to CharSourceRange rather than SourceRange
The only client of the 'toSourceRange' method immediately constructs a
CharSourceRange from it, and ByteBasedSourceRange's EndLoc isn't the start of
the last token in the range (as SourceRange expects).
2018-10-11 14:36:09 -07:00
Erik Eckstein
7f988f86d7 fix a linker error on the benchmark bot
It looks like removing this dependency (https://github.com/apple/swift/pull/19798) caused the linker error on https://ci.swift.org/view/Pull%20Request/job/swift-PR-osx-perf/
2018-10-11 12:37:27 -07:00
Alex Hoppen
9d9bb5377a [incrParse] Fix issue that did not report the first reparsed character as reparsed 2018-10-11 17:54:35 +02:00
Doug Gregor
264b680e96 Merge branch 'master' into immortal-type-checker 2018-10-10 20:36:23 -07:00
Doug Gregor
599e07e5d9 [Type checker] Keep the type checker alive as long as the ASTContext is.
It is possible for the SIL optimizers, IRGen, etc. to request information
from the AST that only the type checker can provide, but the type checker
is typically torn down after the “type checking” phase. This can lead to
various crashes late in the compilation cycle.

Keep the type checker instance around as long as the ASTContext is alive
or until someone asks for it to be destroyed.

Fixes SR-285 / rdar://problem/23677338.
2018-10-10 16:44:42 -07:00
swift-ci
2fedf28c64 Merge pull request #19800 from compnerd/repackage 2018-10-09 16:51:49 -07:00
swift-ci
d8d0524b67 Merge pull request #19798 from compnerd/source-kit-overlay 2018-10-09 14:34:04 -07:00
Xi Ge
9802206285 Merge pull request #19799 from nkcsgexi/module-digester-swift-only
swift-module-digester: add a flag to include Swift decls specifically.
2018-10-09 14:00:26 -07:00
Saleem Abdulrasool
0295a83237 SourceKit: re-package libdispatch, BlocksRuntime
The SourceKit component requires libdispatch and BlocksRuntime to run.
We build the libraries as part of the build and use it via imported
targets.  Ensure that the dependencies get installed for use at runtime.
2018-10-09 13:23:24 -07:00
Xi Ge
3f58f1e6d3 swift-module-digester: add a flag to include Swift decls specifically.
This flag allows us to diagnose the overlay part exclusively without digesting
the entire SDK framework.
2018-10-09 12:57:22 -07:00
Saleem Abdulrasool
db7b7a7010 SourceKit: the swift-lang requires the standard library
The swift-lang swift module requires the standard library to be built and is
part of the standard library component.  Ensure that this is taken into
consideration when we attempt to build it.
2018-10-09 12:14:11 -07:00