The new SIMD proposal introduced a number of new operators, the presence of
which causes more "expression too complex" failures. Route around the
problem by de-prioritizing those operators, visiting them only if no
other operator could be chosen. This should limit the type checker
performance cost of said operators to only those expressions that need
them OR that already failed to type-check.
Fixes rdar://problem/46541800.
Enable COMDATing in `createFunction`. This is particularly important
for the emission of the GetEnumTagSinglePayload. The function emission
is marked as linkonce ODR but does not get COMDAT'ed currently, breaking
emission on PE/COFF targets like Windows.
While declaration mangling now does the right thing for parameter lists,
the function type mangling unfortunately still models the parameter list
as a single tuple node.
Change the runtime's behavior to match the AST mangler, which wraps
a single tuple-typed parameter in a tuple node, so that we can produce
different mangling trees for function types taking multiple arguments
versus a single tuple argument.
SIL functions for AST declarations do this, and the SIL verifier enforces
this, so let's do it for witness thunks too, fixing a devirtualizer
crash.
Fixes <rdar://problem/46571799>.
The `include` subdirectory now generates a header which is used for the
runtime as well, making this directory a need irrespective of whether
the tools are being built or not. This repairs the build of just the
runtime without the tools.
Use `target_link_libraries` for the linked libraries like the other host
libraries. This is setup for migrating the host libraries and
executables to the LLVM build infrastructure and matches what the rest
of the host tools and libraries do.
Use the elaborated type for the type alias that we are creating.
Because the type inherits from `TargetMetadata`, the reference here is
parsed as a reference to the underlying type in MSVC. Use the
elaborated type to resolve to the type itself. The rules for these
changed around C++11, but MSVC defaults to the old style of the name
resolution. NFC.
Validating a declaration can trigger conformance checking. If the conformance checker
comes across the same declaration as a candidate witness, it would fail to emit a
diagnostic. As a result we would then go onto SILGen, which would crash while emitting
a witness table with a missing entry.
Fixes <rdar://problem/45151902>.
If we computed captures before completing a lazy getter body, we would fail to
consider the 'self' capture properly. Instead make it resilient to such ordering
issues by checking in capture computation if the lazy property has a getter yet
or not.
* cmake: Propagate SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT to overlay builds.
* runtime: Clear the correct bit in getROData()
* test/IRGen/objc_class_export.swift: Allow either is-Swift bit.
* test/stdlib/SwiftObjectNSObject.swift: Allow either name for SwiftObject.
This patch mainly consolidates the functions used to check accessors vs.
other decls, and makes sure we check setter access as well as regular
decl access.
rdar://45217648
Previously, members of protocols that were not protocol requirements,
like accessors and typealiases, did not inherit @usableFromInline from
the parent protocol. Change this so they do.