diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-03 17:25:55 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-03 17:25:55 +0000 |
commit | 854a1dce88410944503961dc2d30f961f298a24b (patch) | |
tree | 02e3d01f3d8a19a84cc478c4ba9acea6d917dc0d /test/CodeGenCXX/debug-info-enum-class.cpp | |
parent | 538fc03aa2e71d8291fed39e0e278e8f285583e4 (diff) | |
download | clang-854a1dce88410944503961dc2d30f961f298a24b.tar.gz |
DebugInfo: Move new hierarchy into place (clang)
Update testcases for LLVM change in r231082 to use the new debug info
hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-enum-class.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-enum-class.cpp | 64 |
1 files changed, 50 insertions, 14 deletions
diff --git a/test/CodeGenCXX/debug-info-enum-class.cpp b/test/CodeGenCXX/debug-info-enum-class.cpp index 28ffce046c..61b502e40d 100644 --- a/test/CodeGenCXX/debug-info-enum-class.cpp +++ b/test/CodeGenCXX/debug-info-enum-class.cpp @@ -9,9 +9,29 @@ B b; C c; D d; -// CHECK: ; [ DW_TAG_enumeration_type ] [A] [line 3, size 32, align 32, offset 0] [def] [from int] -// CHECK: ; [ DW_TAG_enumeration_type ] [B] [line 4, size 64, align 64, offset 0] [def] [from long unsigned int] -// CHECK: ; [ DW_TAG_enumeration_type ] [C] [line 5, size 32, align 32, offset 0] [def] [from ] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "A" +// CHECK-SAME: line: 3 +// CHECK-SAME: baseType: ![[INT:[0-9]+]] +// CHECK-SAME: size: 32, align: 32 +// CHECK-NOT: offset: +// CHECK-NOT: flags: +// CHECK-SAME: ){{$}} +// CHECK: ![[INT]] = !MDBasicType(name: "int" +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "B" +// CHECK-SAME: line: 4 +// CHECK-SAME: baseType: ![[ULONG:[0-9]+]] +// CHECK-SAME: size: 64, align: 64 +// CHECK-NOT: offset: +// CHECK-NOT: flags: +// CHECK-SAME: ){{$}} +// CHECK: ![[ULONG]] = !MDBasicType(name: "long unsigned int" +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "C" +// CHECK-SAME: line: 5 +// CHECK-NOT: baseType: +// CHECK-SAME: size: 32, align: 32 +// CHECK-NOT: offset: +// CHECK-NOT: flags: +// CHECK-SAME: ){{$}} namespace PR14029 { // Make sure this doesn't crash/assert. @@ -29,10 +49,13 @@ namespace PR14029 { namespace test2 { // FIXME: this should just be a declaration under -fno-standalone-debug -// CHECK: !"0x4\00{{.*}}", {{[^,]*}}, [[TEST2:![0-9]*]], {{.*}}, [[TEST_ENUMS:![0-9]*]], null, null, !"_ZTSN5test21EE"} ; [ DW_TAG_enumeration_type ] [E] -// CHECK: [[TEST2]] = {{.*}} ; [ DW_TAG_namespace ] [test2] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" +// CHECK-SAME: scope: [[TEST2:![0-9]+]] +// CHECK-SAME: elements: [[TEST_ENUMS:![0-9]+]] +// CHECK-SAME: identifier: "_ZTSN5test21EE" +// CHECK: [[TEST2]] = !MDNamespace(name: "test2" // CHECK: [[TEST_ENUMS]] = !{[[TEST_E:![0-9]*]]} -// CHECK: [[TEST_E]] = !{!"0x28\00e\000"} ; [ DW_TAG_enumerator ] [e :: 0] +// CHECK: [[TEST_E]] = !MDEnumerator(name: "e", value: 0) enum E : int; void func(E *) { } @@ -41,16 +64,22 @@ enum E : int { e }; namespace test3 { // FIXME: this should just be a declaration under -fno-standalone-debug -// CHECK: !"0x4\00{{.*}}", {{[^,]*}}, [[TEST3:![0-9]*]], {{.*}}, [[TEST_ENUMS]], null, null, !"_ZTSN5test31EE"} ; [ DW_TAG_enumeration_type ] [E] -// CHECK: [[TEST3]] = {{.*}} ; [ DW_TAG_namespace ] [test3] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" +// CHECK-SAME: scope: [[TEST3:![0-9]+]] +// CHECK-SAME: elements: [[TEST_ENUMS]] +// CHECK-SAME: identifier: "_ZTSN5test31EE" +// CHECK: [[TEST3]] = !MDNamespace(name: "test3" enum E : int { e }; void func(E *) { } } namespace test4 { -// CHECK: !"0x4\00{{.*}}", {{[^,]*}}, [[TEST4:![0-9]*]], {{.*}}, [[TEST_ENUMS]], null, null, !"_ZTSN5test41EE"} ; [ DW_TAG_enumeration_type ] [E] -// CHECK: [[TEST4]] = {{.*}} ; [ DW_TAG_namespace ] [test4] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" +// CHECK-SAME: scope: [[TEST4:![0-9]+]] +// CHECK-SAME: elements: [[TEST_ENUMS]] +// CHECK-SAME: identifier: "_ZTSN5test41EE" +// CHECK: [[TEST4]] = !MDNamespace(name: "test4" enum E : int; void f1(E *) { } @@ -59,11 +88,18 @@ void f2(E) { } } -// CHECK: ; [ DW_TAG_enumeration_type ] [D] [line 6, size 16, align 16, offset 0] [decl] [from ] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "D" +// CHECK-SAME: line: 6 +// CHECK-SAME: size: 16, align: 16 +// CHECK-NOT: offset: +// CHECK-SAME: flags: DIFlagFwdDecl namespace test5 { -// CHECK: !"0x4\00{{.*}}", {{[^,]*}}, [[TEST5:![0-9]*]], {{.*}}, null, null, null, !"_ZTSN5test51EE"} ; [ DW_TAG_enumeration_type ] [E] -// CHECK: [[TEST5]] = {{.*}} ; [ DW_TAG_namespace ] [test5] +// CHECK: !MDCompositeType(tag: DW_TAG_enumeration_type, name: "E" +// CHECK-SAME: scope: [[TEST5:![0-9]+]] +// CHECK-SAME: flags: DIFlagFwdDecl +// CHECK-SAME: identifier: "_ZTSN5test51EE" +// CHECK: [[TEST5]] = !MDNamespace(name: "test5" enum E : int; void f1(E *) { } @@ -73,7 +109,7 @@ namespace test6 { // Ensure typedef'd enums aren't manifest by debug info generation. // This could cause "typedef changes linkage of anonymous type, but linkage was // already computed" errors. -// CHECK-NOT: test7 +// CHECK-NOT: test6 typedef enum { } E; } |