1 ; RUN: llc -mtriple=aarch64-windows -filetype=obj -o - %s | \
2 ; RUN: llvm-readobj --codeview - | FileCheck %s
5 source_filename = "a.c"
6 target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"
7 target triple = "aarch64--windows-msvc18.0.0"
9 ; Function Attrs: noinline nounwind optnone
10 define i32 @main() #0 !dbg !7 {
12 %retval = alloca i32, align 4
13 store i32 0, i32* %retval, align 4
17 attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false" "use-soft-float"="false" }
20 !llvm.module.flags = !{!3, !4, !5}
23 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
24 !1 = !DIFile(filename: "a.c", directory: "/", checksumkind: CSK_MD5, checksum: "12345678901234567890123456789012")
26 !3 = !{i32 2, !"CodeView", i32 1}
27 !4 = !{i32 2, !"Debug Info Version", i32 3}
28 !5 = !{i32 1, !"wchar_size", i32 2}
30 !7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, retainedNodes: !2)
31 !8 = !DISubroutineType(types: !9)
33 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
34 !11 = !DILocation(line: 2, column: 3, scope: !7)
36 ; CHECK: Format: COFF-ARM64
37 ; CHECK: Arch: aarch64
38 ; CHECK: AddressSize: 64bit
39 ; CHECK: CodeViewTypes [
40 ; CHECK: Section: .debug$T (5)
42 ; CHECK: ArgList (0x1000) {
43 ; CHECK: TypeLeafKind: LF_ARGLIST (0x1201)
48 ; CHECK: Procedure (0x1001) {
49 ; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008)
50 ; CHECK: ReturnType: int (0x74)
51 ; CHECK: CallingConvention: NearC (0x0)
52 ; CHECK: FunctionOptions [ (0x0)
54 ; CHECK: NumParameters: 0
55 ; CHECK: ArgListType: () (0x1000)
57 ; CHECK: FuncId (0x1002) {
58 ; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601)
59 ; CHECK: ParentScope: 0x0
60 ; CHECK: FunctionType: int () (0x1001)
64 ; CHECK: CodeViewDebugInfo [
65 ; CHECK: Section: .debug$S (4)
68 ; CHECK: SubSectionType: Symbols (0xF1)
69 ; CHECK: Compile3Sym {
70 ; CHECK: Kind: S_COMPILE3 (0x113C)
71 ; CHECK: Language: C (0x0)
72 ; CHECK: Flags [ (0x0)
77 ; CHECK: SubSectionType: Symbols (0xF1)
78 ; CHECK: GlobalProcIdSym {
79 ; CHECK: Kind: S_GPROC32_ID (0x1147)
80 ; CHECK: PtrParent: 0x0
83 ; CHECK: CodeSize: 0x14
84 ; CHECK: DbgStart: 0x0
86 ; CHECK: FunctionType: main (0x1002)
87 ; CHECK: CodeOffset: main+0x0
89 ; CHECK: Flags [ (0x0)
91 ; CHECK: DisplayName: main
92 ; CHECK: LinkageName: main
95 ; CHECK: Kind: S_PROC_ID_END (0x114F)
99 ; CHECK: SubSectionType: Lines (0xF2)
100 ; CHECK: LinkageName: main
102 ; CHECK: Subsection [
103 ; CHECK: SubSectionType: FileChecksums (0xF4)
104 ; CHECK: FileChecksum {
105 ; CHECK: ChecksumSize: 0x10
106 ; CHECK: ChecksumKind: MD5 (0x1)
107 ; CHECK: ChecksumBytes: (12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12)
110 ; CHECK: Subsection [
111 ; CHECK: SubSectionType: StringTable (0xF3)
113 ; CHECK: FunctionLineTable [
114 ; CHECK: LinkageName: main
116 ; CHECK: CodeSize: 0x14
117 ; CHECK: FilenameSegment [
119 ; CHECK: LineNumberStart: 1
120 ; CHECK: LineNumberEndDelta: 0
121 ; CHECK: IsStatement: No
126 ; CHECK: LineNumberStart: 2
127 ; CHECK: LineNumberEndDelta: 0
128 ; CHECK: IsStatement: No