From: Douglas Yung Date: Tue, 7 Aug 2018 21:22:49 +0000 (+0000) Subject: Make test more robust by not checking hard coded debug info values, but instead check... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=493ce822337498f4b3fc2d8835ba97cd7e6622d0;p=clang Make test more robust by not checking hard coded debug info values, but instead check the relationships between them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339185 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl b/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl index 00c4755c1c..031ce72876 100644 --- a/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl +++ b/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl @@ -16,7 +16,7 @@ kernel void test(int i) { // SPIR64: %block_sizes = alloca [1 x i64] // COMMON-LABEL: if.then: // COMMON-NOT: alloca -// CHECK-DEBUG: getelementptr {{.*}} %block_sizes, {{.*}} !dbg !34 +// CHECK-DEBUG: getelementptr {{.*}} %block_sizes, {{.*}} !dbg ![[TEMPLOCATION:[0-9]+]] // COMMON-LABEL: if.end queue_t default_queue; unsigned flags = 0; @@ -27,5 +27,7 @@ kernel void test(int i) { // Check that the temporary is scoped to the `if` -// CHECK-DEBUG: !32 = distinct !DILexicalBlock(scope: !7, file: !1, line: 24) -// CHECK-DEBUG: !34 = !DILocation(line: 25, scope: !32) +// CHECK-DEBUG: ![[TESTFILE:[0-9]+]] = !DIFile(filename: "" +// CHECK-DEBUG: ![[TESTSCOPE:[0-9]+]] = distinct !DISubprogram(name: "test", {{.*}} file: ![[TESTFILE]] +// CHECK-DEBUG: ![[IFSCOPE:[0-9]+]] = distinct !DILexicalBlock(scope: ![[TESTSCOPE]], file: !1, line: 24) +// CHECK-DEBUG: ![[TEMPLOCATION]] = !DILocation(line: 25, scope: ![[IFSCOPE]])