• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; xfail this test on hexagon because upstream llc is not emitting the
2; correct DWARF info. Downstream llc is.
3; XFAIL: hexagon
4
5; RUN: %llc_dwarf -O0 -filetype=obj %s -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s
6; Use correct signedness when emitting constants of derived (sugared) types.
7
8; CHECK: DW_AT_const_value [DW_FORM_sdata] (42)
9; CHECK: DW_AT_const_value [DW_FORM_udata] (117)
10; CHECK: DW_AT_const_value [DW_FORM_udata] (7)
11
12; Function Attrs: uwtable
13define void @main() #0 !dbg !4 {
14entry:
15  tail call void @llvm.dbg.value(metadata i32 42, metadata !10, metadata !DIExpression()), !dbg !21
16  tail call void @llvm.dbg.value(metadata i32 117, metadata !12, metadata !DIExpression()), !dbg !24
17  tail call void @llvm.dbg.value(metadata i16 7, metadata !15, metadata !DIExpression()), !dbg !27
18  ret void, !dbg !29
19}
20
21; Function Attrs: nounwind readnone
22declare void @llvm.dbg.value(metadata, metadata, metadata) #2
23
24attributes #0 = { uwtable }
25attributes #2 = { nounwind readnone }
26
27!llvm.dbg.cu = !{!0}
28!llvm.module.flags = !{!17, !18}
29!llvm.ident = !{!19}
30
31!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
32!1 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo")
33!2 = !{}
34!4 = distinct !DISubprogram(name: "main", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !1, scope: !5, type: !6, retainedNodes: !9)
35!5 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo")
36!6 = !DISubroutineType(types: !7)
37!7 = !{!8}
38!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
39!9 = !{!10, !12, !15}
40!10 = !DILocalVariable(name: "i", line: 5, scope: !4, file: !5, type: !11)
41!11 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)
42!12 = !DILocalVariable(name: "j", line: 7, scope: !4, file: !5, type: !13)
43!13 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !14)
44!14 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
45!15 = !DILocalVariable(name: "c", line: 9, scope: !4, file: !5, type: !16)
46!16 = !DIBasicType(tag: DW_TAG_base_type, name: "char16_t", size: 16, align: 16, encoding: 16)
47!17 = !{i32 2, !"Dwarf Version", i32 4}
48!18 = !{i32 1, !"Debug Info Version", i32 3}
49!19 = !{!"clang version 3.5.0 "}
50!20 = !{i32 42}
51!21 = !DILocation(line: 5, scope: !4)
52!22 = !DILocation(line: 6, scope: !4)
53!23 = !{i32 117}
54!24 = !DILocation(line: 7, scope: !4)
55!25 = !DILocation(line: 8, scope: !4)
56!26 = !{i16 7}
57!27 = !DILocation(line: 9, scope: !4)
58!28 = !DILocation(line: 10, scope: !4)
59!29 = !DILocation(line: 11, scope: !4)
60