From 367989b354d38e9993eb53811501d794b385e661 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sun, 17 Mar 2013 20:29:22 +0000 Subject: [PATCH] Generalize a few debug info test cases Checking for the annotation comment rather than the metadata values makes these tests resilient to a coming refactor that will pull these fields out into a separate metadata node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177237 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/2010-07-23-DeclLoc.cpp | 2 +- test/CodeGenCXX/debug-lambda-expressions.cpp | 2 +- test/CodeGenObjC/debug-info-synthesis.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/CodeGenCXX/2010-07-23-DeclLoc.cpp b/test/CodeGenCXX/2010-07-23-DeclLoc.cpp index 74054481cd..ca5199e483 100644 --- a/test/CodeGenCXX/2010-07-23-DeclLoc.cpp +++ b/test/CodeGenCXX/2010-07-23-DeclLoc.cpp @@ -3,7 +3,7 @@ // First, locate the function decl in metadata, and pluck out the file handle: // CHECK: {{extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*[^ ]+", metadata !}}[[filehandle:[0-9]+]], // Second: Require that filehandle refer to the correct filename: -// CHECK: {{^!}}[[filehandle]] = metadata {{![{].*}} metadata !"decl_should_be_here.hpp", +// CHECK: {{^!}}[[filehandle]] = {{.*}} [ DW_TAG_file_type ] [{{.*}}/decl_should_be_here.hpp] typedef long unsigned int __darwin_size_t; typedef __darwin_size_t size_t; typedef unsigned char uint8_t; diff --git a/test/CodeGenCXX/debug-lambda-expressions.cpp b/test/CodeGenCXX/debug-lambda-expressions.cpp index 05ec523c88..e3edabc275 100644 --- a/test/CodeGenCXX/debug-lambda-expressions.cpp +++ b/test/CodeGenCXX/debug-lambda-expressions.cpp @@ -15,7 +15,7 @@ struct D { D(); D(const D&); int x; }; int d(int x) { D y[10]; [x,y] { return y[x].x; }(); } // Randomness for file. -- 6 -// CHECK: [[FILE:.*]] = metadata !{i32 {{.*}}, metadata !{{.*}}debug-lambda-expressions.cpp{{.*}}; [ DW_TAG_file_type ] +// CHECK: [[FILE:.*]] = {{.*}} [ DW_TAG_file_type ] [{{.*}}debug-lambda-expressions.cpp] // A: 10 // CHECK: [[A_FUNC:.*]] = metadata !{i32 {{.*}}, i32 0, metadata [[FILE]], metadata !"a", metadata !"a", metadata !"_Z1av", metadata {{.*}}, i32 [[A_LINE:.*]], metadata {{.*}}, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @_Z1av, null, null, {{.*}} [ DW_TAG_subprogram ] diff --git a/test/CodeGenObjC/debug-info-synthesis.m b/test/CodeGenObjC/debug-info-synthesis.m index fac9eca4a1..35aecd4f5b 100644 --- a/test/CodeGenObjC/debug-info-synthesis.m +++ b/test/CodeGenObjC/debug-info-synthesis.m @@ -30,5 +30,5 @@ int main(int argc, char *argv[]) { } } -// CHECK: ![[FILE:.*]] = metadata !{i32 {{.*}}, metadata !"./foo.h" +// CHECK: ![[FILE:.*]] = {{.*}}[ DW_TAG_file_type ] [{{.*}}/foo.h] // CHECK: !{{.*}} = metadata !{i32 {{.*}}, i32 0, metadata ![[FILE]], metadata !"-[Foo dict]", metadata !"-[Foo dict]", metadata !"", metadata ![[FILE]], i32 8, metadata !{{.*}}, i1 true, i1 true, i32 0, i32 0, null, i32 320, i1 false, %1* (%0*, i8*)* @"\01-[Foo dict]", null, null, metadata !{{.*}}, i32 8} ; [ DW_TAG_subprogram ] -- 2.40.0