Files
swift-mirror/lib/IRGen/GenStruct.cpp
John McCall b51a69f29f Count tail-padding in the size of imported C types.
This allows us to freely pass the address of a variable of such
types to a C function without worrying about it overwriting other
things if e.g. it memcpy's sizeof(T) bytes and thus clobbers the
otherwise-non-existent tail padding.

There are ways to get this optimization back, but they require
things like materializing to a temporary instead of passing the
address directly.  We haven't done that work yet, so we don't
get to take advantage of it.

rdar://26828018
2016-08-02 13:26:11 -07:00

35 KiB