When emitting metadata for a Swift-defined @objc protocol that has
provided a specific Objective-C name (e.g., via @objc(renamed)),
mangle such protocols using their Objective-C names so they can be
found at runtime.
Only do this for metadata, because doing it anywhere else would cause
an ABI break. Fixes rdar://problem/47877748.
The host tools may be built with the host compiler. cl objects to the
"extern C" function returning a C++ type which the keypath functions do.
However, these declarations are needed only in the runtime, which is
always built with clang. Preprocess away the declarations during the
build of the compiler. This allows us to build with cl once more.
We were previously treating all the builds as shared, which is not the
case for the host library build of SwiftRemoteMirror. The warnings were
lost in the interminable spew from the build which is now fixed and this
stands out.
To correctly call designated super class initializers the designated
intializer (and not the allocator) is dynamically replaceable.
Convenience allocators are dynamically replaceable as before.
The basic theory here is as follows:
- The resilience expansion never changes the lowered type, only the
SIL type category (object or address). This means that function
types always pass resilient values indirectly regardless of
expansion, etc.
- The getTypeLowering() methods all take an optional 'forExpansion'
parameter. Soon, these will become non-optional and I'll audit all
call sites to pass the right expansion; for convenience, the
entry points on SILFunction will pass the right expansion.
Places I need to revisit and pass the right expansion in are marked
as 'FIXME: Expansion'.
For now, this just fixes a SILCombiner bug. After some more plumbing
this will enable SILGen to produce better code.
Progress on <rdar://problem/24057844>,
<https://bugs.swift.org/browse/SR-261>.
This utility is generally a horrible idea but even worse the
callers were not doing anything to ensure the required
invariants actually held.
Add a new canReplaceLoadSequence() method and chek it in the
right places.
Windows doesn't know what a shebang is, so it's unable to run tests that
use -driver-use-frontend-path with a script. This allows the script
interpreter to be run as the executable with the script as its first
argument. e.g. --driver-use-frontend-path "python;my-script.py"
yields in generalized accessors: _read and _modify, which are
yield-once corountines. This pass is based on the existing SIL verifier
checks but diagnoses only those errors that can be introduced by programmers
when using yields.
<rdar://43578476>
Split the addImage method for ELF into two branches for ELF32 and for
ELF64 depending on the value stored in the identifier of the image.
Most of the code of the previous function moves into readELFSections,
which is build similar to the already existing readMachOSections. The
code is only modified to use the types from the template parameter.
This fixes a couple of reflection tests in Android armv7 (and I suppose
it should also fix the same problem in other 32 bits platforms which use
ELF).
The dependency file that is being generated should not escape : and # in
the filename. This makes the behaviour of the filename escaping similar
to clang and GCC and fixes incorrect quoting of paths on Windows.