[all-commits] [llvm/llvm-project] 907d3a: [Clang][CodeGen]Beautify dump format, add indent f...

wangyihan via All-commits all-commits at lists.llvm.org
Wed Mar 30 16:44:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 907d3acefc3bdd6eb83f21589c6473ca7e88b3eb
      https://github.com/llvm/llvm-project/commit/907d3acefc3bdd6eb83f21589c6473ca7e88b3eb
  Author: wangyihan <1135831309 at qq.com>
  Date:   2022-03-31 (Thu, 31 Mar 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGen/dump-struct-builtin.c

  Log Message:
  -----------
  [Clang][CodeGen]Beautify dump format, add indent for nested struct and struct members

Beautify dump format, add indent for nested struct and struct members, also fix test cases in dump-struct-builtin.c
for example:
struct:
```
  struct A {
    int a;
    struct B {
      int b;
      struct C {
        struct D {
          int d;
          union E {
            int x;
            int y;
          } e;
        } d;
        int c;
      } c;
    } b;
  };
```
Before:
```
struct A {
int a = 0
struct B {
    int b = 0
struct C {
struct D {
            int d = 0
union E {
                int x = 0
                int y = 0
                }
            }
        int c = 0
        }
    }
}
```
After:
```
struct A {
    int a = 0
    struct B {
        int b = 0
        struct C {
            struct D {
                int d = 0
                union E {
                    int x = 0
                    int y = 0
                }
            }
            int c = 0
        }
    }
}
```

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D122704




More information about the All-commits mailing list