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).
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).
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.