2010-11-29 07:58:32 +00:00
|
|
|
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
|
2010-08-24 20:23:51 +00:00
|
|
|
; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
|
2010-11-29 07:58:32 +00:00
|
|
|
; REQUIRES: loadable_module
|
2010-08-24 20:23:51 +00:00
|
|
|
|
|
|
|
; Bugpoint should keep the call's metadata attached to the call.
|
|
|
|
|
2013-08-06 19:38:43 +00:00
|
|
|
; CHECK: call void @foo(), !dbg !0, !attach !4
|
2010-08-24 20:23:51 +00:00
|
|
|
; CHECK: !0 = metadata !{i32 104, i32 105, metadata !1, metadata !1}
|
2013-08-06 19:38:43 +00:00
|
|
|
; 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"}
|
2010-08-24 20:23:51 +00:00
|
|
|
|
|
|
|
%rust_task = type {}
|
|
|
|
define void @test(i32* %a, i8* %b) {
|
|
|
|
%s = mul i8 22, 9, !attach !0, !dbg !10
|
|
|
|
store i8 %s, i8* %b, !attach !1, !dbg !11
|
|
|
|
call void @foo(), !attach !2, !dbg !12
|
|
|
|
store i32 7, i32* %a, !attach !3, !dbg !13
|
|
|
|
%t = add i32 0, 5, !attach !4, !dbg !14
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
!0 = metadata !{metadata !"boring"}
|
|
|
|
!1 = metadata !{metadata !"uninteresting"}
|
|
|
|
!2 = metadata !{metadata !"the call to foo"}
|
|
|
|
!3 = metadata !{metadata !"noise"}
|
|
|
|
!4 = metadata !{metadata !"filler"}
|
|
|
|
|
2013-08-06 19:38:43 +00:00
|
|
|
!9 = metadata !{i32 458769, metadata !15, i32 0, metadata !"me", i1 true, metadata !"", i32 0, metadata !16, metadata !16, null, null, null, metadata !""}
|
2010-08-24 20:23:51 +00:00
|
|
|
!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}
|
2013-08-06 19:38:43 +00:00
|
|
|
!15 = metadata !{metadata !"source.c", metadata !"/dir"}
|
|
|
|
!16 = metadata !{i32 0}
|