llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
327 stars 86 forks source link

[CIR][Codegen] fix union init with constant #548

Closed gitoleg closed 4 months ago

gitoleg commented 4 months ago

Minor fix for the case when union fields have different sizes and union is inited with a constant. Example:

typedef union {
  short a;
  int b;
} A;