From bc8569d0c09368d2375f3b6bb895e07a9e24df41 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Sat, 23 Nov 2013 01:16:29 +0000 Subject: Debug Info: update testing cases to specify the debug info version number. We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. Make tests more robust by removing hard-coded metadata numbers in CHECK lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195535 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/BugPoint/metadata.ll | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'test/BugPoint') diff --git a/test/BugPoint/metadata.ll b/test/BugPoint/metadata.ll index 2ba1a9f210..cc043f084f 100644 --- a/test/BugPoint/metadata.ll +++ b/test/BugPoint/metadata.ll @@ -4,12 +4,12 @@ ; Bugpoint should keep the call's metadata attached to the call. -; CHECK: call void @foo(), !dbg !0, !attach !4 -; CHECK: !0 = metadata !{i32 104, i32 105, metadata !1, metadata !1} -; CHECK: !1 = metadata !{i32 458769, metadata !2, i32 0, metadata !"me", i1 true, metadata !"", i32 0, metadata !3, metadata !3, null, null, null, metadata !""} -; CHECK: !2 = metadata !{metadata !"source.c", metadata !"/dir"} -; CHECK: !3 = metadata !{i32 0} -; CHECK: !4 = metadata !{metadata !"the call to foo"} +; CHECK: call void @foo(), !dbg ![[LOC:[0-9]+]], !attach ![[CALL:[0-9]+]] +; CHECK: ![[LOC]] = metadata !{i32 104, i32 105, metadata ![[SCOPE:[0-9]+]], metadata ![[SCOPE]]} +; CHECK: ![[SCOPE]] = metadata !{i32 458769, metadata ![[FILE:[0-9]+]], i32 0, metadata !"me", i1 true, metadata !"", i32 0, metadata ![[LIST:[0-9]+]], metadata ![[LIST]], null, null, null, metadata !""} +; CHECK: ![[FILE]] = metadata !{metadata !"source.c", metadata !"/dir"} +; CHECK: ![[LIST]] = metadata !{i32 0} +; CHECK: ![[CALL]] = metadata !{metadata !"the call to foo"} %rust_task = type {} define void @test(i32* %a, i8* %b) { @@ -23,6 +23,8 @@ define void @test(i32* %a, i8* %b) { declare void @foo() +!llvm.module.flags = !{!17} + !0 = metadata !{metadata !"boring"} !1 = metadata !{metadata !"uninteresting"} !2 = metadata !{metadata !"the call to foo"} @@ -37,3 +39,4 @@ declare void @foo() !14 = metadata !{i32 108, i32 109, metadata !9, metadata !9} !15 = metadata !{metadata !"source.c", metadata !"/dir"} !16 = metadata !{i32 0} +!17 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} -- cgit v1.2.3