From 4ae7ea674572723ad58cd35838c3e7f8a867d15b Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 26 Aug 2013 23:19:37 +0000 Subject: [PATCH] Debug Info: follow-up patch to r189283. Thanks David for his suggestion. This commit updates testing cases to have more specific CHECKs. llvm-svn: 189286 --- clang/test/CodeGen/debug-info-args.c | 2 +- clang/test/CodeGenCXX/debug-info-artificial-arg.cpp | 2 +- clang/test/CodeGenCXX/debug-info-enum.cpp | 6 +++--- clang/test/CodeGenCXX/debug-info-method.cpp | 2 +- clang/test/CodeGenCXX/debug-info-template-member.cpp | 2 +- clang/test/CodeGenCXX/debug-info-template-quals.cpp | 2 +- clang/test/CodeGenCXX/debug-info-template.cpp | 4 ++-- clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp | 2 +- clang/test/CodeGenCXX/debug-info.cpp | 2 +- clang/test/CodeGenObjC/debug-info-instancetype.m | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clang/test/CodeGen/debug-info-args.c b/clang/test/CodeGen/debug-info-args.c index 5de12c91ba39..50b85411adb9 100644 --- a/clang/test/CodeGen/debug-info-args.c +++ b/clang/test/CodeGen/debug-info-args.c @@ -2,7 +2,7 @@ int somefunc(char *x, int y, double z) { - // CHECK: metadata ![[NUM:[^,]*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type + // CHECK: metadata ![[NUM:[^,]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type // CHECK: ![[NUM]] = {{metadata !{metadata ![^,]*, metadata ![^,]*, metadata ![^,]*, metadata ![^,]*}}} return y; diff --git a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp b/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp index 07281cef4820..41f7e36ad37a 100644 --- a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp +++ b/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp @@ -25,5 +25,5 @@ int main(int argc, char **argv) { // CHECK: ![[ARTARG:.*]] = {{.*}} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from A] // CHECK: ![[CLASSTYPE:.*]] = {{.*}} ; [ DW_TAG_class_type ] [A] // CHECK: metadata ![[CLASSTYPE]], {{.*}} ; [ DW_TAG_subprogram ] [line 12] [A] -// CHECK: metadata [[FUNCTYPE:![0-9]*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: metadata [[FUNCTYPE:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: [[FUNCTYPE]] = metadata !{null, metadata ![[ARTARG]], metadata !{{.*}}, metadata !{{.*}}} diff --git a/clang/test/CodeGenCXX/debug-info-enum.cpp b/clang/test/CodeGenCXX/debug-info-enum.cpp index 9ae03fa10a89..ae1f22f9c44b 100644 --- a/clang/test/CodeGenCXX/debug-info-enum.cpp +++ b/clang/test/CodeGenCXX/debug-info-enum.cpp @@ -4,7 +4,7 @@ // CHECK: [[ENUMS]] = metadata !{metadata [[E1:![0-9]*]], metadata [[E2:![0-9]*]], metadata [[E3:![0-9]*]]} namespace test1 { -// CHECK: [[E1]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST1:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS:![0-9]*]], {{[^,]*}}, null{{.*}}} ; [ DW_TAG_enumeration_type ] [e] +// CHECK: [[E1]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST1:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS:![0-9]*]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e] // CHECK: [[TEST1]] = {{.*}} ; [ DW_TAG_namespace ] [test1] // CHECK: [[TEST1_ENUMS]] = metadata !{metadata [[TEST1_E:![0-9]*]]} // CHECK: [[TEST1_E]] = {{.*}}, metadata !"E", i64 0} ; [ DW_TAG_enumerator ] [E :: 0] @@ -16,7 +16,7 @@ void foo() { namespace test2 { // rdar://8195980 -// CHECK: [[E2]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST2:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS]], {{[^,]*}}, null{{.*}}} ; [ DW_TAG_enumeration_type ] [e] +// CHECK: [[E2]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST2:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e] // CHECK: [[TEST2]] = {{.*}} ; [ DW_TAG_namespace ] [test2] enum e { E }; bool func(int i) { @@ -25,7 +25,7 @@ bool func(int i) { } namespace test3 { -// CHECK: [[E3]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST3:![0-9]*]], {{.*}}, metadata [[TEST3_ENUMS:![0-9]*]], {{[^,]*}}, null{{.*}}} ; [ DW_TAG_enumeration_type ] [e] +// CHECK: [[E3]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST3:![0-9]*]], {{.*}}, metadata [[TEST3_ENUMS:![0-9]*]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e] // CHECK: [[TEST3]] = {{.*}} ; [ DW_TAG_namespace ] [test3] // CHECK: [[TEST3_ENUMS]] = metadata !{metadata [[TEST3_E:![0-9]*]]} // CHECK: [[TEST3_E]] = {{.*}}, metadata !"E", i64 -1} ; [ DW_TAG_enumerator ] [E :: -1] diff --git a/clang/test/CodeGenCXX/debug-info-method.cpp b/clang/test/CodeGenCXX/debug-info-method.cpp index ed3566872687..8c7b47ed1d21 100644 --- a/clang/test/CodeGenCXX/debug-info-method.cpp +++ b/clang/test/CodeGenCXX/debug-info-method.cpp @@ -3,7 +3,7 @@ // CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected] // CHECK: DW_TAG_ptr_to_member_type // CHECK: {{.*}}metadata ![[MEMFUNTYPE:[0-9]+]], metadata !{{.*}}} ; [ DW_TAG_ptr_to_member_type ] {{.*}} [from ] -// CHECK: ![[MEMFUNTYPE]] = {{.*}}metadata ![[MEMFUNARGS:[0-9]+]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] {{.*}} [from ] +// CHECK: ![[MEMFUNTYPE]] = {{.*}}metadata ![[MEMFUNARGS:[0-9]+]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] {{.*}} [from ] // CHECK: ![[MEMFUNARGS]] = {{.*}}, metadata ![[THISTYPE]], // CHECK: ""{{.*}}DW_TAG_arg_variable // CHECK: ""{{.*}}DW_TAG_arg_variable diff --git a/clang/test/CodeGenCXX/debug-info-template-member.cpp b/clang/test/CodeGenCXX/debug-info-template-member.cpp index 0ea4274cb0e3..cb9922cc1fcb 100644 --- a/clang/test/CodeGenCXX/debug-info-template-member.cpp +++ b/clang/test/CodeGenCXX/debug-info-template-member.cpp @@ -43,5 +43,5 @@ outer::inner x; // CHECK: [[FOO_MEM:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_structure_type ] [foo] // CHECK: [[FOO_MEM]] = metadata !{metadata [[FOO_FUNC:![0-9]*]]} // CHECK: [[FOO_FUNC]] = {{.*}}, metadata !"_ZN3foo4funcEN5outerIS_E5innerE", i32 {{[0-9]*}}, metadata [[FOO_FUNC_TYPE:![0-9]*]], {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [func] -// CHECK: [[FOO_FUNC_TYPE]] = {{.*}}, metadata [[FOO_FUNC_PARAMS:![0-9]*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: [[FOO_FUNC_TYPE]] = {{.*}}, metadata [[FOO_FUNC_PARAMS:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: [[FOO_FUNC_PARAMS]] = metadata !{null, metadata !{{[0-9]*}}, metadata [[OUTER_FOO_INNER]]} diff --git a/clang/test/CodeGenCXX/debug-info-template-quals.cpp b/clang/test/CodeGenCXX/debug-info-template-quals.cpp index 11ce1aaddd01..5ea6875add55 100644 --- a/clang/test/CodeGenCXX/debug-info-template-quals.cpp +++ b/clang/test/CodeGenCXX/debug-info-template-quals.cpp @@ -20,7 +20,7 @@ void foo (const char *c) { // CHECK: [[CH]] = {{.*}} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char] // CHECK: {{.*}} metadata [[TYPE:![0-9]*]], {{.*}}, metadata !{{[0-9]*}}, metadata !{{[0-9]*}}, i32 8} ; [ DW_TAG_subprogram ] [line 7] [def] [scope 8] [assign] -// CHECK: [[TYPE]] = metadata !{i32 {{.*}}, metadata [[ARGS:.*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: [[TYPE]] = metadata !{i32 {{.*}}, metadata [[ARGS:.*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: [[ARGS]] = metadata !{metadata !{{.*}}, metadata !{{.*}}, metadata [[P]], metadata [[R:.*]]} // CHECK: [[BS:.*]] = {{.*}} ; [ DW_TAG_structure_type ] [basic_string] [line 4, size 8, align 8, offset 0] [def] [from ] // CHECK: [[R]] = {{.*}}, metadata [[CON2:![0-9]*]]} ; [ DW_TAG_reference_type ] [line 0, size 0, align 0, offset 0] [from ] diff --git a/clang/test/CodeGenCXX/debug-info-template.cpp b/clang/test/CodeGenCXX/debug-info-template.cpp index 0a12c43355c8..5b20120e8dcc 100644 --- a/clang/test/CodeGenCXX/debug-info-template.cpp +++ b/clang/test/CodeGenCXX/debug-info-template.cpp @@ -26,7 +26,7 @@ // pointer type) // CHECK: [[FOO]] = {{.*}} ; [ DW_TAG_structure_type ] [foo] // CHECK: metadata !"f", metadata !"_ZN3foo1fEv", i32 {{[0-9]*}}, metadata [[FTYPE:![0-9]*]], -// CHECK: [[FTYPE:![0-9]*]] = {{.*}}, metadata [[FARGS:![0-9]*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: [[FTYPE:![0-9]*]] = {{.*}}, metadata [[FARGS:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: [[FARGS]] = metadata !{null, metadata [[FARG1:![0-9]*]]} // CHECK: [[FARG1]] = {{.*}} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from foo] // @@ -38,7 +38,7 @@ // CHECK: [[MEMFUNPTR]] = {{.*}}, metadata [[FTYPE]], metadata [[FOO]]} ; [ DW_TAG_ptr_to_member_type ] // CHECK: [[TCARG6]] = {{.*}}metadata !"f", metadata [[FUNPTR:![0-9]*]], void ()* @_Z4funcv, {{.*}} ; [ DW_TAG_template_value_parameter ] // CHECK: [[FUNPTR]] = {{.*}}, metadata [[FUNTYPE:![0-9]*]]} ; [ DW_TAG_pointer_type ] -// CHECK: [[FUNTYPE]] = {{.*}}, metadata [[FUNARGS:![0-9]*]], i32 0, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: [[FUNTYPE]] = {{.*}}, metadata [[FUNARGS:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: [[FUNARGS]] = metadata !{null} // CHECK: [[TCARG7]] = {{.*}}metadata !"tmpl", null, metadata !"tmpl_impl", {{.*}} ; [ DW_TAG_GNU_template_template_param ] // CHECK: [[TCARG8]] = {{.*}}metadata !"Is", null, metadata [[TCARG8_VALS:![0-9]*]], {{.*}} ; [ DW_TAG_GNU_template_parameter_pack ] diff --git a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp index 973c7fca6461..101796509da3 100644 --- a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp +++ b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp @@ -7,6 +7,6 @@ class A { A a; // CHECK: metadata [[ARRAY_TYPE:![0-9]*]]} ; [ DW_TAG_member ] [x] -// CHECK: metadata [[ELEM_TYPE:![0-9]*]], i32 0, null{{.*}}} ; [ DW_TAG_array_type ] [line 0, size 0, align 32, offset 0] [from int] +// CHECK: metadata [[ELEM_TYPE:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 0, align 32, offset 0] [from int] // CHECK: [[ELEM_TYPE]] = metadata !{metadata [[SUBRANGE:.*]]} // CHECK: [[SUBRANGE]] = metadata !{i32 786465, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [unbounded] diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp index bb55857aeb53..dc7895363cff 100644 --- a/clang/test/CodeGenCXX/debug-info.cpp +++ b/clang/test/CodeGenCXX/debug-info.cpp @@ -87,7 +87,7 @@ struct incomplete; incomplete (*x)[3]; // CHECK: metadata [[INCARRAYPTR:![0-9]*]], i32 0, i32 1, [3 x i8]** @_ZN6pr96081xE, null} ; [ DW_TAG_variable ] [x] // CHECK: [[INCARRAYPTR]] = {{.*}}metadata [[INCARRAY:![0-9]*]]} ; [ DW_TAG_pointer_type ] -// CHECK: [[INCARRAY]] = {{.*}}metadata [[INCTYPE:![0-9]*]], metadata {{![0-9]*}}, i32 0, null{{.*}}} ; [ DW_TAG_array_type ] [line 0, size 0, align 0, offset 0] [from incomplete] +// CHECK: [[INCARRAY]] = {{.*}}metadata [[INCTYPE:![0-9]*]], metadata {{![0-9]*}}, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 0, align 0, offset 0] [from incomplete] // CHECK: [[INCTYPE]] = {{.*}} ; [ DW_TAG_structure_type ] [incomplete]{{.*}} [decl] } diff --git a/clang/test/CodeGenObjC/debug-info-instancetype.m b/clang/test/CodeGenObjC/debug-info-instancetype.m index e439c5166685..1c155179a382 100644 --- a/clang/test/CodeGenObjC/debug-info-instancetype.m +++ b/clang/test/CodeGenObjC/debug-info-instancetype.m @@ -15,7 +15,7 @@ +(instancetype)defaultFoo {return 0;} // CHECK: ![[FOO:[0-9]+]] = metadata {{.*}}; [ DW_TAG_structure_type ] [Foo] // CHECK: metadata !"+[Foo defaultFoo]", metadata !"", i32 [[@LINE-2]], metadata ![[TYPE:[0-9]+]] -// CHECK: ![[TYPE]] = {{.*}} metadata ![[RESULT:[0-9]+]], i32 {{.*}}, null{{.*}}} ; [ DW_TAG_subroutine_type ] +// CHECK: ![[TYPE]] = {{.*}} metadata ![[RESULT:[0-9]+]], i32 {{.*}}, null, null, null} ; [ DW_TAG_subroutine_type ] // CHECK: ![[RESULT]] = metadata {{.*}}{metadata ![[FOOPTR:[0-9]+]], // CHECK: ![[FOOPTR]] = {{.*}}, metadata ![[FOO]]}{{.*}}[ DW_TAG_pointer_type ] {{.*}} [from Foo] @end