xref: /aosp_15_r20/external/llvm/test/DebugInfo/X86/inline-asm-locs.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin %s -o - -filetype=asm | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Generated from:
4*9880d681SAndroid Build Coastguard Worker; asm(
5*9880d681SAndroid Build Coastguard Worker;       ".file 1 \"A.asm\"\n"
6*9880d681SAndroid Build Coastguard Worker;       ".file 2 \"B.asm\"\n"
7*9880d681SAndroid Build Coastguard Worker;       ".loc  1 111\n"
8*9880d681SAndroid Build Coastguard Worker;       ".text\n"
9*9880d681SAndroid Build Coastguard Worker;       ".globl _bar\n"
10*9880d681SAndroid Build Coastguard Worker;       "_bar:\n"
11*9880d681SAndroid Build Coastguard Worker;       ".loc 2 222\n"
12*9880d681SAndroid Build Coastguard Worker;       "\tret\n"
13*9880d681SAndroid Build Coastguard Worker;     );
14*9880d681SAndroid Build Coastguard Worker;
15*9880d681SAndroid Build Coastguard Worker; void bar();
16*9880d681SAndroid Build Coastguard Worker;
17*9880d681SAndroid Build Coastguard Worker; void foo() {
18*9880d681SAndroid Build Coastguard Worker;   bar();
19*9880d681SAndroid Build Coastguard Worker; }
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; CHECK: .file 1 "A.asm"
22*9880d681SAndroid Build Coastguard Worker; CHECK: .file 2 "B.asm"
23*9880d681SAndroid Build Coastguard Worker; CHECK: .loc  1 111
24*9880d681SAndroid Build Coastguard Worker; CHECK: .loc  2 222
25*9880d681SAndroid Build Coastguard Worker; CHECK: .file 3 "test.c"
26*9880d681SAndroid Build Coastguard Worker; CHECK: .loc  3 14 0
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
29*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx"
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Workermodule asm ".file 1 \22A.asm\22"
32*9880d681SAndroid Build Coastguard Workermodule asm ".file 2 \22B.asm\22"
33*9880d681SAndroid Build Coastguard Workermodule asm ".loc  1 111"
34*9880d681SAndroid Build Coastguard Workermodule asm ".text"
35*9880d681SAndroid Build Coastguard Workermodule asm ".globl _bar"
36*9880d681SAndroid Build Coastguard Workermodule asm "_bar:"
37*9880d681SAndroid Build Coastguard Workermodule asm ".loc 2 222"
38*9880d681SAndroid Build Coastguard Workermodule asm "\09ret"
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind ssp uwtable
41*9880d681SAndroid Build Coastguard Workerdefine void @foo() !dbg !4 {
42*9880d681SAndroid Build Coastguard Workerentry:
43*9880d681SAndroid Build Coastguard Worker  call void (...) @bar(), !dbg !11
44*9880d681SAndroid Build Coastguard Worker  ret void, !dbg !12
45*9880d681SAndroid Build Coastguard Worker}
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerdeclare void @bar(...)
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
50*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!7, !8, !9}
51*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!10}
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 256963)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
54*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/radar/22690666")
55*9880d681SAndroid Build Coastguard Worker!2 = !{}
56*9880d681SAndroid Build Coastguard Worker!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 14, type: !5, isLocal: false, isDefinition: true, scopeLine: 14, isOptimized: false, unit: !0, variables: !2)
57*9880d681SAndroid Build Coastguard Worker!5 = !DISubroutineType(types: !6)
58*9880d681SAndroid Build Coastguard Worker!6 = !{null}
59*9880d681SAndroid Build Coastguard Worker!7 = !{i32 2, !"Dwarf Version", i32 2}
60*9880d681SAndroid Build Coastguard Worker!8 = !{i32 2, !"Debug Info Version", i32 3}
61*9880d681SAndroid Build Coastguard Worker!9 = !{i32 1, !"PIC Level", i32 2}
62*9880d681SAndroid Build Coastguard Worker!10 = !{!"clang version 3.8.0 (trunk 256963)"}
63*9880d681SAndroid Build Coastguard Worker!11 = !DILocation(line: 15, column: 3, scope: !4)
64*9880d681SAndroid Build Coastguard Worker!12 = !DILocation(line: 16, column: 1, scope: !4)
65