[PATCH] D122920: [Clang][CodeGen]Fix __builtin_dump_struct missing record type field name

Wang Yihan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 1 10:42:38 PDT 2022


yihanaa created this revision.
yihanaa added reviewers: rsmith, erichkeane, aaron.ballman.
yihanaa added a project: clang.
Herald added a project: All.
yihanaa requested review of this revision.
Herald added a subscriber: cfe-commits.

Thanks for @rsmith to point this. I'm sorry for introducing this bug.
See @rsmith 's comment in https://reviews.llvm.org/D122248
Eg:(By @rsmith ) https://godbolt.org/z/o7vcbWaEf
I have added a test case
struct:

  struct U19A {
      int a;
    };
    struct U19B {
      struct U19A a;
    };
  
    struct U19B a = {
      .a.a = 2022
    };

Dump result:

  struct U19B {
      struct U19A a = {
          int a = 2022
      }
  }


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122920

Files:
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/dump-struct-builtin.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122920.419801.patch
Type: text/x-patch
Size: 42629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220401/cfc612e0/attachment-0001.bin>


More information about the cfe-commits mailing list