1; RUN: opt -S -simplifycfg < %s | FileCheck %s
2; Radar 9342286
3; Assign DebugLoc to trap instruction.
4define void @foo() nounwind ssp !dbg !0 {
5; CHECK: call void @llvm.trap(), !dbg
6  store i32 42, i32* null, !dbg !5
7  ret void, !dbg !7
8}
9
10!llvm.dbg.cu = !{!2}
11!llvm.module.flags = !{!10}
12!llvm.dbg.sp = !{!0}
13
14!0 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !1, type: !3)
15!1 = !DIFile(filename: "foo.c", directory: "/private/tmp")
16!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "Apple clang version 3.0 (tags/Apple/clang-206.1) (based on LLVM 3.0svn)", isOptimized: true, emissionKind: 0, file: !8, enums: !{}, retainedTypes: !{}, subprograms: !9)
17!3 = !DISubroutineType(types: !4)
18!4 = !{null}
19!5 = !DILocation(line: 4, column: 2, scope: !6)
20!6 = distinct !DILexicalBlock(line: 3, column: 12, file: !8, scope: !0)
21!7 = !DILocation(line: 5, column: 1, scope: !6)
22!8 = !DIFile(filename: "foo.c", directory: "/private/tmp")
23!9 = !{!0}
24!10 = !{i32 1, !"Debug Info Version", i32 3}
25