blob: cd94f74dcbe30c3ad4e6ec9f87f8f800b82a8a09 [file] [log] [blame]
Adrian Prantl9013c4b2015-02-02 18:31:58 +00001; RUN: llc < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
2; from (at -Os):
3; void foo() {
4; float a = 3.14;
5; *(int *)&a = 0;
6; }
7target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
8target triple = "x86_64-apple-macosx10.10.0"
9
10; Function Attrs: nounwind optsize readnone uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +000011define void @foo() #0 !dbg !7 {
Adrian Prantl9013c4b2015-02-02 18:31:58 +000012entry:
13 tail call void @llvm.dbg.declare(metadata float* undef, metadata !13, metadata !19), !dbg !20
14 tail call void @llvm.dbg.value(metadata i32 1078523331, i64 0, metadata !13, metadata !19), !dbg !20
15 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !13, metadata !19), !dbg !20
16; CHECK: DW_AT_const_value [DW_FORM_sdata] (0)
17; CHECK-NEXT: DW_AT_name {{.*}}"a"
18 ret void, !dbg !21
19}
20
21; Function Attrs: nounwind readnone
22declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
23
24; Function Attrs: nounwind readnone
25declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
26
27attributes #0 = { nounwind optsize readnone uwtable }
28attributes #1 = { nounwind readnone }
29
30!llvm.dbg.cu = !{!0}
31!llvm.module.flags = !{!15, !16, !17}
32!llvm.ident = !{!18}
33
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +000034!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 227686)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !6, globals: !2, imports: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000035!1 = !DIFile(filename: "foo.c", directory: "")
Adrian Prantl9013c4b2015-02-02 18:31:58 +000036!2 = !{}
37!3 = !{!4}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000038!4 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !5)
39!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Adrian Prantl9013c4b2015-02-02 18:31:58 +000040!6 = !{!7}
Peter Collingbourned4bff302015-11-05 22:03:56 +000041!7 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: true, scopeLine: 1, file: !8, scope: !9, type: !10, variables: !12)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000042!8 = !DIFile(filename: "foo.c", directory: "")
43!9 = !DIFile(filename: "foo.c", directory: "")
44!10 = !DISubroutineType(types: !11)
Adrian Prantl9013c4b2015-02-02 18:31:58 +000045!11 = !{null}
46!12 = !{!13}
Duncan P. N. Exon Smithed013cd2015-07-31 18:58:39 +000047!13 = !DILocalVariable(name: "a", line: 2, scope: !7, file: !9, type: !14)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000048!14 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
Adrian Prantl9013c4b2015-02-02 18:31:58 +000049!15 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000050!16 = !{i32 2, !"Debug Info Version", i32 3}
Adrian Prantl9013c4b2015-02-02 18:31:58 +000051!17 = !{i32 1, !"PIC Level", i32 2}
52!18 = !{!"clang version 3.7.0 (trunk 227686)"}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000053!19 = !DIExpression()
54!20 = !DILocation(line: 2, column: 9, scope: !7)
55!21 = !DILocation(line: 4, column: 1, scope: !7)