summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-11-23 01:16:29 +0000
committerManman Ren <manman.ren@gmail.com>2013-11-23 01:16:29 +0000
commitbc8569d0c09368d2375f3b6bb895e07a9e24df41 (patch)
tree3654df0d2102cfb202eed3340d01053a4e0920d4 /test/Transforms
parentfbe605e7122e319eacfbc708660bed48ecce7cf2 (diff)
downloadllvm-bc8569d0c09368d2375f3b6bb895e07a9e24df41.tar.gz
llvm-bc8569d0c09368d2375f3b6bb895e07a9e24df41.tar.bz2
llvm-bc8569d0c09368d2375f3b6bb895e07a9e24df41.tar.xz
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
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/LICM/debug-value.ll2
-rw-r--r--test/Transforms/LoopIdiom/debug-line.ll2
-rw-r--r--test/Transforms/LoopRotate/dbgvalue.ll2
-rw-r--r--test/Transforms/ObjCARC/basic.ll10
-rw-r--r--test/Transforms/SimplifyCFG/hoist-dbgvalue.ll2
5 files changed, 15 insertions, 3 deletions
diff --git a/test/Transforms/LICM/debug-value.ll b/test/Transforms/LICM/debug-value.ll
index c1300012c0..e5c774ff8e 100644
--- a/test/Transforms/LICM/debug-value.ll
+++ b/test/Transforms/LICM/debug-value.ll
@@ -33,6 +33,7 @@ for.end104: ; preds = %for.cond.backedge
declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+!llvm.module.flags = !{!26}
!llvm.dbg.sp = !{!0, !6, !9, !10}
!0 = metadata !{i32 589870, metadata !25, metadata !1, metadata !"idamax", metadata !"idamax", metadata !"", i32 112, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, null, null, null, null, i32 0} ; [ DW_TAG_subprogram ]
@@ -61,3 +62,4 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
!23 = metadata !{i32 296, i32 13, metadata !17, null}
!24 = metadata !{i32 313, i32 1, metadata !14, null}
!25 = metadata !{metadata !"/Volumes/Lalgate/work/llvm/projects/llvm-test/SingleSource/Benchmarks/CoyoteBench/lpbench.c", metadata !"/private/tmp"}
+!26 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
diff --git a/test/Transforms/LoopIdiom/debug-line.ll b/test/Transforms/LoopIdiom/debug-line.ll
index 343c380084..ef4a478d0e 100644
--- a/test/Transforms/LoopIdiom/debug-line.ll
+++ b/test/Transforms/LoopIdiom/debug-line.ll
@@ -27,6 +27,7 @@ declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+!llvm.module.flags = !{!19}
!llvm.dbg.sp = !{!0}
!0 = metadata !{i32 589870, metadata !18, metadata !1, metadata !"foo", metadata !"foo", metadata !"", i32 2, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (double*)* @foo, null, null, null, i32 0} ; [ DW_TAG_subprogram ] [line 2] [def] [scope 0] [foo]
@@ -48,3 +49,4 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
!16 = metadata !{i32 3, i32 29, metadata !11, null}
!17 = metadata !{i32 5, i32 1, metadata !12, null}
!18 = metadata !{metadata !"li.c", metadata !"/private/tmp"}
+!19 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
diff --git a/test/Transforms/LoopRotate/dbgvalue.ll b/test/Transforms/LoopRotate/dbgvalue.ll
index 1cc78936b3..9461980ac0 100644
--- a/test/Transforms/LoopRotate/dbgvalue.ll
+++ b/test/Transforms/LoopRotate/dbgvalue.ll
@@ -77,6 +77,7 @@ for.end:
ret void
}
+!llvm.module.flags = !{!20}
!llvm.dbg.sp = !{!0}
!0 = metadata !{i32 589870, metadata !18, metadata !1, metadata !"tak", metadata !"tak", metadata !"", i32 32, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32, i32, i32)* @tak, null, null, null, i32 0} ; [ DW_TAG_subprogram ] [line 32] [def] [scope 0] [tak]
@@ -99,3 +100,4 @@ for.end:
!17 = metadata !{i32 37, i32 1, metadata !13, null}
!18 = metadata !{metadata !"/Volumes/Lalgate/cj/llvm/projects/llvm-test/SingleSource/Benchmarks/BenchmarkGame/recursive.c", metadata !"/Volumes/Lalgate/cj/D/projects/llvm-test/SingleSource/Benchmarks/BenchmarkGame"}
!19 = metadata !{i32 0}
+!20 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
diff --git a/test/Transforms/ObjCARC/basic.ll b/test/Transforms/ObjCARC/basic.ll
index aa22144327..885935c515 100644
--- a/test/Transforms/ObjCARC/basic.ll
+++ b/test/Transforms/ObjCARC/basic.ll
@@ -182,7 +182,7 @@ if.end5: ; preds = %if.then3, %if.end
; CHECK: tail call i8* @objc_retain(i8* %x) [[NUW:#[0-9]+]]
; CHECK-NOT: @objc_
; CHECK: if.end5:
-; CHECK: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release !0
+; CHECK: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE:[0-9]+]]
; CHECK-NOT: @objc_
; CHECK: }
define void @test1b_imprecise(i8* %x, i1 %p, i1 %q) {
@@ -2202,7 +2202,7 @@ define void @test53(void ()** %zz, i8** %pp) {
; CHECK-LABEL: define void @test54(
; CHECK: call i8* @returner()
-; CHECK-NEXT: call void @objc_release(i8* %t) [[NUW]], !clang.imprecise_release !0
+; CHECK-NEXT: call void @objc_release(i8* %t) [[NUW]], !clang.imprecise_release ![[RELEASE]]
; CHECK-NEXT: ret void
; CHECK: }
define void @test54() {
@@ -2236,7 +2236,7 @@ entry:
; CHECK-NEXT: %0 = tail call i8* @objc_retain(i8* %x) [[NUW]]
; CHECK-NEXT: tail call void @use_pointer(i8* %x)
; CHECK-NEXT: tail call void @use_pointer(i8* %x)
-; CHECK-NEXT: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release !0
+; CHECK-NEXT: tail call void @objc_release(i8* %x) [[NUW]], !clang.imprecise_release ![[RELEASE]]
; CHECK-NEXT: br label %if.end
; CHECK-NOT: @objc
; CHECK: }
@@ -3009,7 +3009,11 @@ define void @test67(i8* %x) {
ret void
}
+!llvm.module.flags = !{!1}
+
!0 = metadata !{}
+!1 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
; CHECK: attributes #0 = { nounwind readnone }
; CHECK: attributes [[NUW]] = { nounwind }
+; CHECK: ![[RELEASE]] = metadata !{}
diff --git a/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll b/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
index d324578ebc..0547fa9720 100644
--- a/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
+++ b/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
@@ -29,6 +29,7 @@ declare i32 @bar(...)
declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
+!llvm.module.flags = !{!21}
!llvm.dbg.sp = !{!0}
!0 = metadata !{i32 589870, metadata !20, metadata !1, metadata !"foo", metadata !"foo", metadata !"", i32 2, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (i32)* @foo, null, null, null, i32 0} ; [ DW_TAG_subprogram ] [line 2] [def] [scope 0] [foo]
@@ -52,3 +53,4 @@ declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
!18 = metadata !{i32 8, i32 3, metadata !17, null}
!19 = metadata !{i32 9, i32 3, metadata !10, null}
!20 = metadata !{metadata !"b.c", metadata !"/private/tmp"}
+!21 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}