]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/Generic/cfi-sections.ll
Vendor import of llvm trunk r291274:
[FreeBSD/FreeBSD.git] / test / CodeGen / Generic / cfi-sections.ll
1 ; When using Itanium ABI, do not emit .debug_frame.
2 ; RUNT: llc -mtriple=i386--linux -o - < %s | FileCheck %s -check-prefix=WITHOUT
3 ; RUNT: llc -mtriple=armv7-netbsd-eabi -o - < %s | FileCheck %s -check-prefix=WITHOUT
4
5 ; When using EHABI, do emit .debug_frame.
6 ; RUN: llc -mtriple=arm-linux -mcpu=cortex-a7 -mattr=v7 -o - < %s | FileCheck %s -check-prefix=WITH
7
8 ; REQUIRES: x86-registered-target
9 ; REQUIRES: arm-registered-target
10
11 ; WITH:        .cfi_sections .debug_frame
12 ; WITHOUT-NOT: .cfi_sections
13
14 define i32 @foo() #0 !dbg !7 {
15   %1 = call i32 @bar()
16   %2 = call i32 @bar()
17   %3 = add nsw i32 %1, %2
18   ret i32 %3
19 }
20
21 declare i32 @bar() #1
22
23 attributes #0 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="arm7tdmi" "target-features"="+soft-float,+strict-align,-crypto,-neon" "unsafe-fp-math"="false" "use-soft-float"="true" }
24 attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="arm7tdmi" "target-features"="+soft-float,+strict-align,-crypto,-neon" "unsafe-fp-math"="false" "use-soft-float"="true" }
25
26 !llvm.dbg.cu = !{!0}
27 !llvm.module.flags = !{!3, !4, !5, !6}
28
29 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
30 !1 = !DIFile(filename: "cfi-sections.cc", directory: ".")
31 !2 = !{}
32 !3 = !{i32 2, !"Dwarf Version", i32 4}
33 !4 = !{i32 2, !"Debug Info Version", i32 3}
34 !5 = !{i32 1, !"wchar_size", i32 4}
35 !6 = !{i32 1, !"min_enum_size", i32 4}
36 !7 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
37 !8 = !DISubroutineType(types: !9)
38 !9 = !{!10}
39 !10 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)