We compile with a pedantic warning that complains about these things,
and the massive flood of warnings is actually causing problems for the
build infrastructure.
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
<rdar://problem/19104060>
LLVM's PointerIntPair always picks the highest bits of the available low
order free bits but NumLowBitsAvailable is the number of *lowest* bits
available from the LSB. This could cause problems with overwriting when
putting a FlaggedPointer inside a PointerIntPair. Just don't allow it.
Add a static assert to make sure there are enough bits to support the
number of nested FlaggedPointers.
Add a helper constexpr min function which isn't available until C++14.
Swift SVN r23597
References to functions that take inout parameters crash the compiler
because InOutType isn't a "real" type in itself and has no special type
metadata to emit. It merely further qualifies the function's input
types.
For example, we would like to have a unique entry in the cache for:
var f: (T, T) -> ()
and
var f2: (inout T, T) -> ()
For each argument type metadata pointer in the function's input, take
advantage of pointer alignment and mark the lowest bit if it is inout.
Since the metadata cache uses pointers to create the key, this creates a
unique entry while still being able to extract the actual pointer.
This fixes <rdar://problem/17655125>, and a couple of other similar
crashes.
Swift SVN r23557