Michael Gottesman | e590441 | 2013-08-23 00:23:28 +0000 | [diff] [blame] | 1 | ; RUN: opt -strip-debug < %s -S | FileCheck %s |
| 2 | |
| 3 | ; CHECK-NOT: llvm.dbg |
Devang Patel | db735cb | 2010-06-30 21:29:00 +0000 | [diff] [blame] | 4 | |
| 5 | @x = common global i32 0 ; <i32*> [#uses=0] |
| 6 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 7 | define void @foo() nounwind readnone optsize ssp !dbg !0 { |
Devang Patel | db735cb | 2010-06-30 21:29:00 +0000 | [diff] [blame] | 8 | entry: |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 9 | tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !5, metadata !{}), !dbg !10 |
Devang Patel | db735cb | 2010-06-30 21:29:00 +0000 | [diff] [blame] | 10 | ret void, !dbg !11 |
| 11 | } |
| 12 | |
Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 13 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone |
Devang Patel | db735cb | 2010-06-30 21:29:00 +0000 | [diff] [blame] | 14 | |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 15 | !llvm.module.flags = !{!13} |
Adrian Prantl | b01a4d4 | 2016-04-11 15:53:44 +0000 | [diff] [blame] | 16 | !llvm.dbg.cu = !{!2} |
Devang Patel | db735cb | 2010-06-30 21:29:00 +0000 | [diff] [blame] | 17 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 18 | !0 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !12, scope: !1, type: !3) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 19 | !1 = !DIFile(filename: "b.c", directory: "/tmp") |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 20 | !2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !12, globals: !{!8}) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 21 | !3 = !DISubroutineType(types: !4) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 22 | !4 = !{null} |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 23 | !5 = !DILocalVariable(name: "y", line: 3, scope: !6, file: !1, type: !7) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 24 | !6 = distinct !DILexicalBlock(line: 2, column: 0, file: !12, scope: !0) |
| 25 | !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 26 | !8 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7, variable: i32* @x) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 27 | !9 = !{i32 0} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 28 | !10 = !DILocation(line: 3, scope: !6) |
| 29 | !11 = !DILocation(line: 4, scope: !6) |
| 30 | !12 = !DIFile(filename: "b.c", directory: "/tmp") |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 31 | !13 = !{i32 1, !"Debug Info Version", i32 3} |