Issue 136059
Summary [CIR] Upstream union support
Labels ClangIR
Assignees
Reporter andykaylor
    ### Overview
Upstream support for union types. This will build on the existing record type support, but unions have special layout requirements and need extra handling during lowering to LLVM IR.

### Suggested minimal test case
```
union U {
  int n;
  char c;
};

int f() {
  U u;
  return u.n;
}
```

### Existing incubator tests
clang/test/CIR/CodeGen/union.cpp
clang/test/CIR/CodeGen/union-array.c
clang/test/CIR/CodeGen/union-init.c
clang/test/CIR/CodeGen/union-padding.c

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to