134
|
1 ; MD5 checksums provided by IR should be passed through to asm.
|
|
2 ; They'll be emitted to an object file only for DWARF 5 or later.
|
|
3
|
|
4 ; Darwin clamps the line table at DWARF v2 so XFAIL this test.
|
|
5 ; XFAIL: darwin
|
|
6
|
|
7 ; REQUIRES: object-emission
|
|
8 ; RUN: %llc_dwarf -dwarf-version 4 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM
|
|
9 ; RUN: %llc_dwarf -dwarf-version 5 -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM
|
|
10 ; RUN: %llc_dwarf -dwarf-version 4 -filetype=obj -o %t4.o %s
|
|
11 ; RUN: llvm-dwarfdump -debug-line %t4.o | FileCheck %s --check-prefix=OBJ-4
|
|
12 ; RUN: %llc_dwarf -dwarf-version 5 -filetype=obj -o %t5.o %s
|
|
13 ; RUN: llvm-dwarfdump -debug-line %t5.o | FileCheck %s --check-prefix=OBJ-5
|
|
14
|
|
15 ; FIXME: Need to convey the MD5 for the primary source file.
|
|
16 ; ASM: .file 1 ".{{/|\\\\}}t1.h" md5 "11111111111111111111111111111111"
|
|
17 ; ASM: .file 2 ".{{/|\\\\}}t2.h" md5 "22222222222222222222222222222222"
|
|
18
|
|
19 ; OBJ-4: Dir Mod Time File Len File Name
|
|
20 ; OBJ-4: file_names[ 1] 1 0x00000000 0x00000000 "t1.h"
|
|
21 ; OBJ-4: file_names[ 2] 1 0x00000000 0x00000000 "t2.h"
|
|
22
|
|
23 ; OBJ-5: Dir MD5 Checksum File Name
|
|
24 ; OBJ-5: file_names[ 0] 1 11111111111111111111111111111111 "t1.h"
|
|
25 ; OBJ-5: file_names[ 1] 1 22222222222222222222222222222222 "t2.h"
|
|
26
|
|
27 ; ModuleID = 't.c'
|
|
28 source_filename = "t.c"
|
|
29
|
|
30 @t1 = global i32 1, align 4, !dbg !0
|
|
31 @t2 = global i32 0, align 4, !dbg !6
|
|
32
|
|
33 !llvm.dbg.cu = !{!2}
|
|
34 !llvm.module.flags = !{!11, !12, !13}
|
|
35 !llvm.ident = !{!14}
|
|
36
|
|
37 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
|
38 !1 = distinct !DIGlobalVariable(name: "t1", scope: !2, file: !10, line: 1, type: !9, isLocal: false, isDefinition: true)
|
|
39 !2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (trunk 322159)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
|
|
40 !3 = !DIFile(filename: "t.c", directory: "/home/probinson/projects/scratch", checksumkind: CSK_MD5, checksum: "00000000000000000000000000000000")
|
|
41 !4 = !{}
|
|
42 !5 = !{!0, !6}
|
|
43 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
|
|
44 !7 = distinct !DIGlobalVariable(name: "t2", scope: !2, file: !8, line: 1, type: !9, isLocal: false, isDefinition: true)
|
|
45 !8 = !DIFile(filename: "./t2.h", directory: "/home/probinson/projects/scratch", checksumkind: CSK_MD5, checksum: "22222222222222222222222222222222")
|
|
46 !9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
47 !10 = !DIFile(filename: "./t1.h", directory: "/home/probinson/projects/scratch", checksumkind: CSK_MD5, checksum: "11111111111111111111111111111111")
|
|
48 !11 = !{i32 2, !"Dwarf Version", i32 4}
|
|
49 !12 = !{i32 2, !"Debug Info Version", i32 3}
|
|
50 !13 = !{i32 1, !"wchar_size", i32 4}
|
|
51 !14 = !{!"clang version 7.0.0 (trunk 322159)"}
|