• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s | FileCheck %s
2; FIXME: fastisel screws up the order here.
3; RUNX: llc -O0 < %s | FileCheck %s
4
5; Source to regenerate:
6; $ clang --target=x86_64-windows-msvc -S annotation.c  -g -gcodeview -o t.ll \
7;      -emit-llvm -O1 -Xclang -disable-llvm-passes -fms-extensions
8; void g(void);
9; void f(void) {
10;   g();
11;   __annotation(L"a1", L"a2");
12;   g();
13; }
14
15; ModuleID = 'annotation.c'
16source_filename = "annotation.c"
17target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
18target triple = "x86_64-pc-windows-msvc19.0.24215"
19
20; Function Attrs: nounwind uwtable
21define void @f() #0 !dbg !8 {
22entry:
23  call void @g(), !dbg !11
24  call void @llvm.codeview.annotation(metadata !12), !dbg !13
25  call void @g(), !dbg !14
26  ret void, !dbg !15
27}
28
29; CHECK-LABEL: f: # @f
30; CHECK: callq g
31; CHECK: .Lannotation0:
32; CHECK: callq g
33; CHECK: retq
34
35; CHECK-LABEL: .short  4423                    # Record kind: S_GPROC32_ID
36; CHECK:       .short  4121                    # Record kind: S_ANNOTATION
37; CHECK-NEXT:  .secrel32       .Lannotation0
38; CHECK-NEXT:  .secidx .Lannotation0
39; CHECK-NEXT:  .short  2
40; CHECK-NEXT:  .asciz  "a1"
41; CHECK-NEXT:  .asciz  "a2"
42
43; CHECK-LABEL: .short  4431                    # Record kind: S_PROC_ID_END
44
45declare void @g() #1
46
47; Function Attrs: nounwind
48declare void @llvm.codeview.annotation(metadata) #2
49
50attributes #0 = { nounwind uwtable "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"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
51attributes #1 = { "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-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
52attributes #2 = { nounwind }
53
54!llvm.dbg.cu = !{!0}
55!llvm.module.flags = !{!3, !4, !5, !6}
56!llvm.ident = !{!7}
57
58!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
59!1 = !DIFile(filename: "annotation.c", directory: "C:\5Csrc\5Cllvm-project\5Cbuild", checksumkind: CSK_MD5, checksum: "51164221112d8a5baa55a995027e4ba5")
60!2 = !{}
61!3 = !{i32 2, !"CodeView", i32 1}
62!4 = !{i32 2, !"Debug Info Version", i32 3}
63!5 = !{i32 1, !"wchar_size", i32 2}
64!6 = !{i32 7, !"PIC Level", i32 2}
65!7 = !{!"clang version 6.0.0 "}
66!8 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)
67!9 = !DISubroutineType(types: !10)
68!10 = !{null}
69!11 = !DILocation(line: 3, column: 3, scope: !8)
70!12 = !{!"a1", !"a2"}
71!13 = !DILocation(line: 4, column: 3, scope: !8)
72!14 = !DILocation(line: 5, column: 3, scope: !8)
73!15 = !DILocation(line: 6, column: 1, scope: !8)
74