blob: ec2fcc4f55f4dae2038b6052b92f2ec181a7a59d [file] [log] [blame]
Mandeep Singh Grangd41ac892017-07-20 20:20:00 +00001; RUN: llc -mtriple=aarch64-windows -filetype=obj -o - %s | \
2; RUN: llvm-readobj -codeview - | FileCheck %s
3
4; ModuleID = 'a.c'
5source_filename = "a.c"
6target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"
7target triple = "aarch64--windows-msvc18.0.0"
8
9; Function Attrs: noinline nounwind optnone
10define i32 @main() #0 !dbg !7 {
11entry:
12 %retval = alloca i32, align 4
13 store i32 0, i32* %retval, align 4
14 ret i32 1, !dbg !11
15}
16
17attributes #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" }
18
19!llvm.dbg.cu = !{!0}
20!llvm.module.flags = !{!3, !4, !5}
21!llvm.ident = !{!6}
22
23!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
Paul Robinsoncc9c8b92018-01-11 22:03:43 +000024!1 = !DIFile(filename: "a.c", directory: "/", checksumkind: CSK_MD5, checksum: "12345678901234567890123456789012")
Mandeep Singh Grangd41ac892017-07-20 20:20:00 +000025!2 = !{}
26!3 = !{i32 2, !"CodeView", i32 1}
27!4 = !{i32 2, !"Debug Info Version", i32 3}
28!5 = !{i32 1, !"wchar_size", i32 2}
29!6 = !{!"clang"}
30!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2)
31!8 = !DISubroutineType(types: !9)
32!9 = !{!10}
33!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
34!11 = !DILocation(line: 2, column: 3, scope: !7)
35
36; CHECK: Format: COFF-ARM64
37; CHECK: Arch: aarch64
38; CHECK: AddressSize: 64bit
39; CHECK: CodeViewTypes [
40; CHECK: Section: .debug$T (5)
41; CHECK: Magic: 0x4
42; CHECK: ArgList (0x1000) {
43; CHECK: TypeLeafKind: LF_ARGLIST (0x1201)
44; CHECK: NumArgs: 0
45; CHECK: Arguments [
46; CHECK: ]
47; CHECK: }
48; CHECK: Procedure (0x1001) {
49; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008)
50; CHECK: ReturnType: int (0x74)
51; CHECK: CallingConvention: NearC (0x0)
52; CHECK: FunctionOptions [ (0x0)
53; CHECK: ]
54; CHECK: NumParameters: 0
55; CHECK: ArgListType: () (0x1000)
56; CHECK: }
57; CHECK: FuncId (0x1002) {
58; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601)
59; CHECK: ParentScope: 0x0
60; CHECK: FunctionType: int () (0x1001)
61; CHECK: Name: main
62; CHECK: }
63; CHECK: ]
64; CHECK: CodeViewDebugInfo [
65; CHECK: Section: .debug$S (4)
66; CHECK: Magic: 0x4
67; CHECK: Subsection [
68; CHECK: SubSectionType: Symbols (0xF1)
69; CHECK: Compile3Sym {
70; CHECK: Kind: S_COMPILE3 (0x113C)
71; CHECK: Language: C (0x0)
72; CHECK: Flags [ (0x0)
73; CHECK: ]
74; CHECK: }
75; CHECK: ]
76; CHECK: Subsection [
77; CHECK: SubSectionType: Symbols (0xF1)
78; CHECK: GlobalProcIdSym {
79; CHECK: Kind: S_GPROC32_ID (0x1147)
80; CHECK: PtrParent: 0x0
81; CHECK: PtrEnd: 0x0
82; CHECK: PtrNext: 0x0
83; CHECK: CodeSize: 0x14
84; CHECK: DbgStart: 0x0
85; CHECK: DbgEnd: 0x0
86; CHECK: FunctionType: main (0x1002)
87; CHECK: CodeOffset: main+0x0
88; CHECK: Segment: 0x0
89; CHECK: Flags [ (0x0)
90; CHECK: ]
91; CHECK: DisplayName: main
92; CHECK: LinkageName: main
93; CHECK: }
94; CHECK: ProcEnd {
95; CHECK: Kind: S_PROC_ID_END (0x114F)
96; CHECK: }
97; CHECK: ]
98; CHECK: Subsection [
99; CHECK: SubSectionType: Lines (0xF2)
100; CHECK: LinkageName: main
101; CHECK: ]
102; CHECK: Subsection [
103; CHECK: SubSectionType: FileChecksums (0xF4)
104; CHECK: FileChecksum {
Paul Robinsoncc9c8b92018-01-11 22:03:43 +0000105; CHECK: ChecksumSize: 0x10
Reid Kleckner26fa1bf2017-09-19 18:14:45 +0000106; CHECK: ChecksumKind: MD5 (0x1)
Paul Robinsoncc9c8b92018-01-11 22:03:43 +0000107; CHECK: ChecksumBytes: (12 34 56 78 90 12 34 56 78 90 12 34 56 78 90 12)
Mandeep Singh Grangd41ac892017-07-20 20:20:00 +0000108; CHECK: }
109; CHECK: ]
110; CHECK: Subsection [
111; CHECK: SubSectionType: StringTable (0xF3)
112; CHECK: ]
113; CHECK: FunctionLineTable [
114; CHECK: LinkageName: main
115; CHECK: Flags: 0x1
116; CHECK: CodeSize: 0x14
117; CHECK: FilenameSegment [
118; CHECK: +0x0 [
119; CHECK: LineNumberStart: 1
120; CHECK: LineNumberEndDelta: 0
121; CHECK: IsStatement: No
122; CHECK: ColStart: 0
123; CHECK: ColEnd: 0
124; CHECK: ]
125; CHECK: +0x8 [
126; CHECK: LineNumberStart: 2
127; CHECK: LineNumberEndDelta: 0
128; CHECK: IsStatement: No
129; CHECK: ColStart: 3
130; CHECK: ColEnd: 0
131; CHECK: ]
132; CHECK: ]
133; CHECK: ]
134; CHECK: ]