Commit Graph

3 Commits

Author SHA1 Message Date
Erik Eckstein
0830c36974 [tests] add import statements to prevent unresolved symbols when compiling StdlibUnittest with -sil-serialize-all.
This is the second part of 308f39fe56.
It fixes (better: works-around) linker errors when testing in optimized mode.
2015-12-15 10:46:10 -08:00
Slava Pestov
023596783b ClangImporter: Support unnamed struct and union types
This covers this case:

struct foo {
  struct {
    int x;
    int y;
  } bar;

  union {
    void *ptr;
    float num;
  } baz;
};

Based on the original patch by Graham Batty.

Progress on <rdar://problem/21683348> -- anonymous unnamed unions
are still not supported (struct foo { union { int x, y }; };).

Swift SVN r31924
2015-09-14 08:46:56 +00:00
Slava Pestov
9242f6ab51 ClangImporter support for bitfields
Bitfields are imported as computed properties with Clang-generated
accessors.

While we cannot represent them directly in SIL, we can still
synthesize a memberwise initializer, so also decouple that notion
from "has unreferenceable storage".

Fixes <rdar://problem/21702107>.

Swift SVN r31779
2015-09-08 22:12:14 +00:00