summaryrefslogtreecommitdiff
path: root/test/BugPoint
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-08-01 20:52:39 +0000
committerManman Ren <manman.ren@gmail.com>2013-08-01 20:52:39 +0000
commitf589eef8645219dbcd1a4eec85ffb34a067534a6 (patch)
tree578ff6ab4a2d6c71ab726a6c6c1482ad72dd90ed /test/BugPoint
parentc8b93557da150e051c273701652a2db328708708 (diff)
downloadllvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.gz
llvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.bz2
llvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.xz
Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/BugPoint')
-rw-r--r--test/BugPoint/metadata.ll12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/BugPoint/metadata.ll b/test/BugPoint/metadata.ll
index 6dc9574bbe..474dfbec23 100644
--- a/test/BugPoint/metadata.ll
+++ b/test/BugPoint/metadata.ll
@@ -5,10 +5,12 @@
; Bugpoint should keep the call's metadata attached to the call.
-; CHECK: call void @foo(), !dbg !0, !attach !2
+; CHECK: call void @foo(), !dbg !0, !attach !4
; CHECK: !0 = metadata !{i32 104, i32 105, metadata !1, metadata !1}
-; CHECK: !1 = metadata !{i32 0, i32 0, i32 0, metadata !"source.c", metadata !"/dir", metadata !"me", i1 true, i1 false, metadata !"", i32 0}
-; CHECK: !2 = metadata !{metadata !"the call to foo"}
+; 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"}
%rust_task = type {}
define void @test(i32* %a, i8* %b) {
@@ -28,9 +30,11 @@ declare void @foo()
!3 = metadata !{metadata !"noise"}
!4 = metadata !{metadata !"filler"}
-!9 = metadata !{i32 0, i32 0, i32 0, metadata !"source.c", metadata !"/dir", metadata !"me", i1 true, i1 false, metadata !"", i32 0}
+!9 = metadata !{i32 458769, metadata !15, i32 0, metadata !"me", i1 true, metadata !"", i32 0, metadata !16, metadata !16, null, null, null, metadata !""}
!10 = metadata !{i32 100, i32 101, metadata !9, metadata !9}
!11 = metadata !{i32 102, i32 103, metadata !9, metadata !9}
!12 = metadata !{i32 104, i32 105, metadata !9, metadata !9}
!13 = metadata !{i32 106, i32 107, metadata !9, metadata !9}
!14 = metadata !{i32 108, i32 109, metadata !9, metadata !9}
+!15 = metadata !{metadata !"source.c", metadata !"/dir"}
+!16 = metadata !{i32 0}