[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 13:34:42 PDT 2022


erichkeane added a comment.

> I'm sorry I misunderstood what you meant @aaron.ballman.
>
> Can we follow the lead of LLVM IR?it use 'undef'
> for example:
>
>   struct T6A {
>       unsigned a : 1;
>       unsigned  : 0;
>       unsigned c : 1;
>   };
>   
>   @__const.foo.a = private unnamed_addr constant %struct.T6A { i8 1, [3 x i8] undef, i8 1, [3 x i8] undef }, align 4

I misunderstood him too, he told me off line :)

I guess I would be 'ok' with `undef`, though that has a different meaning (it means, this has an arbitrary value).  In this case, it has NO value, which is somewhat different.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122248/new/

https://reviews.llvm.org/D122248



More information about the cfe-commits mailing list