diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-02 00:34:26 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-02 00:34:26 +0000 |
commit | 083b90d654476c3297f85ff844ac2f57bb7f4a21 (patch) | |
tree | 162d9292d7b277a3b7c2b7b698d67e963ba44ccd /test/CodeGenCXX/debug-info-fwd-ref.cpp | |
parent | 1513eb9284c23acfd19cf742b95996fbb11ca741 (diff) |
Generalize DebugInfo tests by avoiding explicit metadata numbers
This addresses several (not all) debug info tests that use explicit metadata
numbers. Wherever the same number appeared more than once in a test I used
a named match to ensure the same number appeared in all those cases (this may
still be overly constraining test cases as they may not have actually cared
about that relationship). For one-off numbers I just replaced them with an
unnamed regex.
This may underconstrain poorly written test cases that were interested in
checking that certain metadata nodes were related but didn't actually match
on all the related nodes numbers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-fwd-ref.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-fwd-ref.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/CodeGenCXX/debug-info-fwd-ref.cpp b/test/CodeGenCXX/debug-info-fwd-ref.cpp index 9135032320..69dd192bd9 100644 --- a/test/CodeGenCXX/debug-info-fwd-ref.cpp +++ b/test/CodeGenCXX/debug-info-fwd-ref.cpp @@ -18,8 +18,8 @@ int main(int argc, char** argv) { // Make sure we have two DW_TAG_structure_types for baz and bar and no forward // references. -// CHECK: metadata !{i32 {{.*}}, null, metadata !"bar", metadata !6, i32 8, i64 128, i64 64, i32 0, i32 0, null, metadata !18, i32 0, null, null} ; [ DW_TAG_structure_type ] -// CHECK: metadata !{i32 {{.*}}, null, metadata !"baz", metadata !6, i32 3, i64 32, i64 32, i32 0, i32 0, null, metadata !21, i32 0, null, null} ; [ DW_TAG_structure_type ] -// CHECK-NOT: metadata !{i32 {{.*}}, null, metadata !"bar", metadata !6, i32 8, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ] -// CHECK-NOT: metadata !{i32 {{.*}}, null, metadata !"baz", metadata !6, i32 3, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_structure_type ] +// CHECK: metadata !{i32 {{.*}}, null, metadata !"bar", metadata ![[FILE:.*]], i32 8, i64 128, i64 64, i32 0, i32 0, null, metadata !{{.*}}, i32 0, null, null} ; [ DW_TAG_structure_type ] +// CHECK: metadata !{i32 {{.*}}, null, metadata !"baz", metadata ![[FILE]], i32 3, i64 32, i64 32, i32 0, i32 0, null, metadata !{{.*}}, i32 0, null, null} ; [ DW_TAG_structure_type ] +// CHECK-NOT: metadata !{i32 {{.*}}, null, metadata !"bar", metadata ![[FILE]], i32 8, i64 0, i64 0, i32 0, i32 4, i32 0, null, i32 0, i32 0} ; [ DW_TAG_structure_type ] +// CHECK-NOT: metadata !{i32 {{.*}}, null, metadata !"baz", metadata ![[FILE]], i32 3, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_structure_type ] |