1; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null 2; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s 3; REQUIRES: loadable_module 4 5; Bugpoint should keep the call's metadata attached to the call. 6 7; CHECK: call void @foo(), !dbg !0, !attach !2 8; CHECK: !0 = metadata !{i32 104, i32 105, metadata !1, metadata !1} 9; CHECK: !1 = metadata !{i32 0, i32 0, i32 0, metadata !"source.c", metadata !"/dir", metadata !"me", i1 true, i1 false, metadata !"", i32 0} 10; CHECK: !2 = metadata !{metadata !"the call to foo"} 11 12%rust_task = type {} 13define void @test(i32* %a, i8* %b) { 14 %s = mul i8 22, 9, !attach !0, !dbg !10 15 store i8 %s, i8* %b, !attach !1, !dbg !11 16 call void @foo(), !attach !2, !dbg !12 17 store i32 7, i32* %a, !attach !3, !dbg !13 18 %t = add i32 0, 5, !attach !4, !dbg !14 19 ret void 20} 21 22declare void @foo() 23 24!0 = metadata !{metadata !"boring"} 25!1 = metadata !{metadata !"uninteresting"} 26!2 = metadata !{metadata !"the call to foo"} 27!3 = metadata !{metadata !"noise"} 28!4 = metadata !{metadata !"filler"} 29 30!9 = metadata !{i32 0, i32 0, i32 0, metadata !"source.c", metadata !"/dir", metadata !"me", i1 true, i1 false, metadata !"", i32 0} 31!10 = metadata !{i32 100, i32 101, metadata !9, metadata !9} 32!11 = metadata !{i32 102, i32 103, metadata !9, metadata !9} 33!12 = metadata !{i32 104, i32 105, metadata !9, metadata !9} 34!13 = metadata !{i32 106, i32 107, metadata !9, metadata !9} 35!14 = metadata !{i32 108, i32 109, metadata !9, metadata !9} 36