| David Blaikie | eb1a272 | 2014-06-13 22:18:23 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %s \ |
| 2 | ; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s |
| Devang Patel | 3c6aed2 | 2011-05-27 16:45:18 +0000 | [diff] [blame] | 3 | target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" |
| 4 | target triple = "x86_64-apple-macosx10.6.7" |
| 5 | ; Radar 9511391 |
| 6 | |
| Eric Christopher | 9d1daa8 | 2013-08-27 23:49:04 +0000 | [diff] [blame] | 7 | ; CHECK: DW_TAG_variable |
| David Blaikie | eb1a272 | 2014-06-13 22:18:23 +0000 | [diff] [blame] | 8 | ; CHECK-NOT: DW_TAG |
| 9 | ; CHECK: DW_AT_const_value [DW_FORM_sdata] (42) |
| 10 | ; CHECK-NOT: DW_TAG |
| 11 | ; CHECK: DW_AT_name {{.*}} "i" |
| Eric Christopher | 9d1daa8 | 2013-08-27 23:49:04 +0000 | [diff] [blame] | 12 | |
| Devang Patel | 3c6aed2 | 2011-05-27 16:45:18 +0000 | [diff] [blame] | 13 | define i32 @foo() nounwind uwtable readnone optsize ssp { |
| 14 | entry: |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 15 | tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !6, metadata !MDExpression()), !dbg !9 |
| Devang Patel | 3c6aed2 | 2011-05-27 16:45:18 +0000 | [diff] [blame] | 16 | ret i32 42, !dbg !10 |
| 17 | } |
| 18 | |
| Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 19 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone |
| Devang Patel | 3c6aed2 | 2011-05-27 16:45:18 +0000 | [diff] [blame] | 20 | |
| 21 | !llvm.dbg.cu = !{!0} |
| Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 22 | !llvm.module.flags = !{!15} |
| Devang Patel | 3c6aed2 | 2011-05-27 16:45:18 +0000 | [diff] [blame] | 23 | |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 24 | !0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 132191)", isOptimized: true, emissionKind: 0, file: !13, enums: !14, retainedTypes: !14, subprograms: !11, imports: null) |
| 25 | !1 = !MDSubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !13, scope: !2, type: !3, function: i32 ()* @foo, variables: !12) |
| 26 | !2 = !MDFile(filename: "a.c", directory: "/private/tmp") |
| 27 | !3 = !MDSubroutineType(types: !4) |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 28 | !4 = !{!5} |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 29 | !5 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 30 | !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "i", line: 2, scope: !7, file: !2, type: !5) |
| 31 | !7 = distinct !MDLexicalBlock(line: 1, column: 11, file: !13, scope: !1) |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 32 | !8 = !{i32 42} |
| Duncan P. N. Exon Smith | 9885469 | 2015-01-14 22:27:36 +0000 | [diff] [blame] | 33 | !9 = !MDLocation(line: 2, column: 12, scope: !7) |
| 34 | !10 = !MDLocation(line: 3, column: 2, scope: !7) |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 35 | !11 = !{!1} |
| 36 | !12 = !{!6} |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 37 | !13 = !MDFile(filename: "a.c", directory: "/private/tmp") |
| Duncan P. N. Exon Smith | 988a7f8 | 2015-03-27 20:46:33 +0000 | [diff] [blame^] | 38 | !14 = !{} |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 39 | !15 = !{i32 1, !"Debug Info Version", i32 3} |