diff options
| author | Bruno Ricci <riccibrun@gmail.com> | 2018-10-29 16:12:37 +0000 |
|---|---|---|
| committer | Bruno Ricci <riccibrun@gmail.com> | 2018-10-29 16:12:37 +0000 |
| commit | e2806f857b772d2f15b39e95685a1c99bdb8aaa7 (patch) | |
| tree | a5a238a0c54b7ebf90eb52a514b0780a270f6000 /clang/test | |
| parent | e92567601b4b457d7f68a31ee21d2c2769c8de3b (diff) | |
| download | bcm5719-llvm-e2806f857b772d2f15b39e95685a1c99bdb8aaa7.tar.gz bcm5719-llvm-e2806f857b772d2f15b39e95685a1c99bdb8aaa7.zip | |
[AST] Only store the needed data in SwitchStmt
Don't store the data for the init statement and condition variable
if not needed. This cuts the size of SwitchStmt by up to 2 pointers.
The order of the children is intentionally kept the same.
Also use the newly available space in the bit-fields of Stmt
to store the bit representing whether all enums have been covered
instead of using a PointerIntPair.
Differential Revision: https://reviews.llvm.org/D53714
Reviewed By: rjmccall
llvm-svn: 345510
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Import/switch-stmt/test.cpp | 7 | ||||
| -rw-r--r-- | clang/test/Misc/ast-dump-color.cpp | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/clang/test/Import/switch-stmt/test.cpp b/clang/test/Import/switch-stmt/test.cpp index 94416aca8cf..05132b7d9b1 100644 --- a/clang/test/Import/switch-stmt/test.cpp +++ b/clang/test/Import/switch-stmt/test.cpp @@ -1,8 +1,6 @@ // RUN: clang-import-test -dump-ast -import %S/Inputs/F.cpp -expression %s | FileCheck %s // CHECK: SwitchStmt -// CHECK-NEXT: <<NULL>> -// CHECK-NEXT: <<NULL>> // CHECK-NEXT: IntegerLiteral // CHECK-NEXT: CompoundStmt // CHECK-NEXT: CaseStmt @@ -22,7 +20,6 @@ // CHECK-NEXT: DeclStmt // CHECK-NEXT: VarDecl // CHECK-SAME: varname -// CHECK-NEXT: <<NULL>> // CHECK-NEXT: IntegerLiteral // CHECK-NEXT: CompoundStmt // CHECK-NEXT: CaseStmt @@ -37,15 +34,11 @@ // CHECK-NEXT: BreakStmt // CHECK: SwitchStmt -// CHECK-NEXT: <<NULL>> -// CHECK-NEXT: <<NULL>> // CHECK-NEXT: IntegerLiteral // CHECK-NEXT: DefaultStmt // CHECK-NEXT: BreakStmt // CHECK: SwitchStmt -// CHECK-NEXT: <<NULL>> -// CHECK-NEXT: <<NULL>> // CHECK-NEXT: IntegerLiteral // CHECK-NEXT: NullStmt diff --git a/clang/test/Misc/ast-dump-color.cpp b/clang/test/Misc/ast-dump-color.cpp index b1144e3ad1e..f21a7285869 100644 --- a/clang/test/Misc/ast-dump-color.cpp +++ b/clang/test/Misc/ast-dump-color.cpp @@ -46,7 +46,6 @@ struct Invalid { //CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]FunctionDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:1[[RESET]], [[Yellow]]line:16:1[[RESET]]> [[Yellow]]line:9:6[[RESET]][[CYAN]] TestAttributedStmt[[RESET]] [[Green]]'void ()'[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[MAGENTA:.\[0;1;35m]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:27[[RESET]], [[Yellow]]line:16:1[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]SwitchStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:3[[RESET]], [[Yellow]]line:15:3[[RESET]]>{{$}} -//CHECK: {{^}}[[Blue]]| | |-[[RESET]][[Blue:.\[0;34m]]<<<NULL>>>[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]| | |-[[RESET]][[MAGENTA]]IntegerLiteral[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:11[[RESET]]> [[Green]]'int'[[RESET]][[Cyan:.\[0;36m]][[RESET]][[Cyan]][[RESET]][[CYAN]] 1[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:14[[RESET]], [[Yellow]]line:15:3[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| | |-[[RESET]][[MAGENTA]]CaseStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:11:3[[RESET]], [[Yellow]]line:12:27[[RESET]]>{{$}} |

