brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.9 KiB · 4951d81 Raw
131 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin < %s -filetype=obj \2; RUN:     | llvm-dwarfdump -v -debug-info - | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s3; RUN: llc -mtriple=x86_64-linux-gnu < %s -filetype=obj \4; RUN:     | llvm-dwarfdump -v -debug-info - | FileCheck %s5; RUN: llc -mtriple=x86_64-apple-darwin < %s -filetype=obj -regalloc=basic \6; RUN:     | llvm-dwarfdump -v -debug-info - | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s7 8; CHECK: DW_TAG_subprogram9; DARWIN:  DW_AT_APPLE_omit_frame_ptr [DW_FORM_flag_present] (true)10; CHECK:   DW_AT_abstract_origin {{.*}} "foo"11; CHECK:   DW_TAG_formal_parameter12; CHECK-NOT: DW_TAG13; CHECK:     DW_AT_abstract_origin {{.*}} "sp"14; CHECK:   DW_TAG_formal_parameter15; CHECK-NOT: DW_TAG16; CHECK:     DW_AT_abstract_origin {{.*}} "nums"17 18; CHECK: DW_TAG_subprogram19; CHECK-NOT: DW_TAG20; CHECK:   DW_AT_name {{.*}} "foo"21; CHECK:   DW_TAG_formal_parameter22; CHECK-NOT: DW_TAG23; CHECK:     DW_AT_name {{.*}} "sp"24; CHECK:   DW_TAG_formal_parameter25; CHECK-NOT: DW_TAG26; CHECK:     DW_AT_name {{.*}} "nums"27 28;CHECK: DW_TAG_inlined_subroutine29;CHECK-NEXT: DW_AT_abstract_origin {{.*}} "foo"30;CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr]31;CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4]32;CHECK-NEXT: DW_AT_call_file33;CHECK-NEXT: DW_AT_call_line34;CHECK-NEXT: DW_AT_call_column35 36;CHECK: DW_TAG_formal_parameter37;CHECK-NOT: DW_TAG38;CHECK:   DW_AT_abstract_origin {{.*}} "sp"39;CHECK: DW_TAG_formal_parameter40;CHECK-NOT: DW_TAG41;CHECK: DW_AT_abstract_origin {{.*}} "nums"42;CHECK-NOT: DW_TAG_formal_parameter43 44source_filename = "test/DebugInfo/X86/dbg-value-inlined-parameter.ll"45 46%struct.S1 = type { ptr, i32 }47 48@p = common global %struct.S1 zeroinitializer, align 8, !dbg !049 50; Function Attrs: nounwind optsize ssp51define i32 @foo(ptr nocapture %sp, i32 %nums) #0 !dbg !15 {52entry:53  tail call void @llvm.dbg.value(metadata ptr %sp, metadata !19, metadata !22), !dbg !2354  tail call void @llvm.dbg.value(metadata i32 %nums, metadata !21, metadata !22), !dbg !2455  %tmp2 = getelementptr inbounds %struct.S1, ptr %sp, i64 0, i32 1, !dbg !2556  store i32 %nums, ptr %tmp2, align 4, !dbg !2557  %call = tail call ptr @bar(i32 %nums) #3, !dbg !2758  store ptr %call, ptr %sp, align 8, !dbg !2759  %cmp = icmp ne ptr %call, null, !dbg !2860  %cond = zext i1 %cmp to i32, !dbg !2861  ret i32 %cond, !dbg !2862}63 64; Function Attrs: optsize65declare ptr @bar(i32) #166 67; Function Attrs: nounwind optsize ssp68define void @foobar() #0 !dbg !29 {69entry:70  tail call void @llvm.dbg.value(metadata ptr @p, metadata !19, metadata !22) #4, !dbg !3271  tail call void @llvm.dbg.value(metadata i32 1, metadata !21, metadata !22) #4, !dbg !3572  store i32 1, ptr getelementptr inbounds (%struct.S1, ptr @p, i64 0, i32 1), align 8, !dbg !3673  %call.i = tail call ptr @bar(i32 1) #3, !dbg !3774  store ptr %call.i, ptr @p, align 8, !dbg !3775  ret void, !dbg !3876}77 78; Function Attrs: nounwind readnone79 80declare void @llvm.dbg.value(metadata, metadata, metadata) #281 82attributes #0 = { nounwind optsize ssp }83attributes #1 = { optsize }84attributes #2 = { nounwind readnone }85attributes #3 = { nounwind optsize }86attributes #4 = { nounwind }87 88!llvm.dbg.cu = !{!2}89!llvm.module.flags = !{!14}90 91!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())92!1 = !DIGlobalVariable(name: "p", scope: !2, file: !3, line: 14, type: !6, isLocal: false, isDefinition: true)93!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)94!3 = !DIFile(filename: "nm2.c", directory: "/private/tmp")95!4 = !{}96!5 = !{!0}97!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", scope: !2, file: !3, line: 4, baseType: !7)98!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "S1", scope: !2, file: !3, line: 1, size: 128, align: 64, elements: !8)99!8 = !{!9, !12}100!9 = !DIDerivedType(tag: DW_TAG_member, name: "m", scope: !3, file: !3, line: 2, baseType: !10, size: 64, align: 64)101!10 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !2, baseType: !11, size: 64, align: 64)102!11 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)103!12 = !DIDerivedType(tag: DW_TAG_member, name: "nums", scope: !3, file: !3, line: 3, baseType: !13, size: 32, align: 32, offset: 64)104!13 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)105!14 = !{i32 1, !"Debug Info Version", i32 3}106!15 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 8, type: !16, isLocal: false, isDefinition: true, scopeLine: 8, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !18)107!16 = !DISubroutineType(types: !17)108!17 = !{!13}109!18 = !{!19, !21}110!19 = !DILocalVariable(name: "sp", arg: 1, scope: !15, file: !3, line: 7, type: !20)111!20 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !2, baseType: !6, size: 64, align: 64)112!21 = !DILocalVariable(name: "nums", arg: 2, scope: !15, file: !3, line: 7, type: !13)113!22 = !DIExpression()114!23 = !DILocation(line: 7, column: 13, scope: !15)115!24 = !DILocation(line: 7, column: 21, scope: !15)116!25 = !DILocation(line: 9, column: 3, scope: !26)117!26 = distinct !DILexicalBlock(scope: !15, file: !3, line: 8, column: 1)118!27 = !DILocation(line: 10, column: 3, scope: !26)119!28 = !DILocation(line: 11, column: 3, scope: !26)120!29 = distinct !DISubprogram(name: "foobar", scope: !3, file: !3, line: 15, type: !30, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2)121!30 = !DISubroutineType(types: !31)122!31 = !{null}123!32 = !DILocation(line: 7, column: 13, scope: !15, inlinedAt: !33)124!33 = !DILocation(line: 16, column: 3, scope: !34)125!34 = distinct !DILexicalBlock(scope: !29, file: !3, line: 15, column: 15)126!35 = !DILocation(line: 7, column: 21, scope: !15, inlinedAt: !33)127!36 = !DILocation(line: 9, column: 3, scope: !26, inlinedAt: !33)128!37 = !DILocation(line: 10, column: 3, scope: !26, inlinedAt: !33)129!38 = !DILocation(line: 17, column: 1, scope: !34)130 131