This issue manifested in crashing when in Xcode one would do the Archive workflow, and we would be missing the Distributed module types and proceed to run into a nullpointer when faced with code like this:
``` public class TestViewModel { public init() {}
public func onReturn() { print("on return executed!") } } ```
where the name matched one of the ad hoc requirements, but we'd get null for the protocol lookup since this does not import the distributed module.
Type substitution eliminates dependencies with Escapable targets.
When a generic function has potentially Escapable outputs, those outputs declare lifetime dependencies, which have no effect when substitution leads to those types becoming `Escapable` in a concrete context. This means that type substitution should canonically eliminate lifetime dependencies targeting Escapable parameters or returns, and that type checking should allow a function value with potentially-Escapable lifetime dependencies to bind to a function type without those dependencies when the target of the dependencies is Escapable.
The code in Process::HandleProcessStateChangedEvent is pretty complicated, and a lot of Swift customizations were added on top of it to support the repl. This commit reduces the area of those customizations by moving them into a separate function; in particular, the code computing whether to "check for a repl breakpoint" was factored out.
The main motivation is that we would like to make some changes in HandleProcessStateChangedEvent, which would run into nasty merge conflicts otherwise.
[lldb][NFC] Reduce scope of Swift customizations - pt 2
This commit builds on the previous one, this time reducing the scope of customizations checking whether the selected thread stopped at a REPL breakpoint.
[AArch64][FastISel] Fallback on atomic stlr/cas with non-reg operands.
This has been a latent bug for almost 10 years, but is relatively hard to trigger, needing an address operand that isn't handled by getRegForValue (in the test here, constexpr casts). When that happens, it returns 0, which FastISel happily uses as a register operand, all the way to asm, where we either get a crash on an invalid register, or a silently corrupt instruction.
Unfortunately, FastISel is still enabled at -O0 for at least ILP32/arm64_32.
[clang][DepScan] Allow ModuleDep to be const (#132968)
This type can be exposed from C APIs, where instantiations of this type are not expected to mutate after creation. To support this, mark the lazy computation of build arguments mutable, as that is not intended to otherwise mutate the state of these objects.
This was reviewed separately by @jansvoboda11
(cherry picked from commit 9aecbdf8ed787a8edd1b7f97a1c7fbf6e9d12515)
[libclang] Add C interface for querying against ModuleDeps
Previously the callback used for getting the output path of pcm's took in the ModuleID, which represents the name & context hash. Now that there are more attributes to determine the output path, like the attribute `isInStableDirectories`. To support this case, allow clients to override the signature of the callback to pass along a reference to the whole `ModuleDep` object instead.
Additionally, this patch:
* Makes calls that unwrap `CXDepGraphModule` const correct. * Provides an API to query whether a module comes from stable directories.
(cherry picked from commit fa17ed7fb43d99c02165b326f4d2907ad19038ae)