brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 30144d7 Raw
61 lines · plain
1; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump -v - | FileCheck %s2; Test that multi-DW_OP_piece expressions are emitted for FI variables.3;4; CHECK: .debug_info contents:5; CHECK: DW_TAG_subprogram6; CHECK:   DW_AT_abstract_origin7; CHECK: DW_TAG_variable8; CHECK-NEXT:   DW_AT_location [DW_FORM_exprloc]	(DW_OP_fbreg -4, DW_OP_piece 0x2, DW_OP_fbreg -8, DW_OP_piece 0x2)9; CHECK-NEXT:   DW_AT_abstract_origin {{.*}}"a"10; Inlined variable, not to be merged.11; CHECK-NOT: DW_TAG12; CHECK: DW_TAG_inlined_subroutine13; CHECK-NOT: DW_TAG14; CHECK:   DW_TAG_variable15; CHECK-NEXT:     DW_AT_location16; CHECK-NEXT:   DW_AT_abstract_origin {{.*}}"a"17 18; ModuleID = '/tmp/t.c'19source_filename = "/tmp/t.c"20target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"21target triple = "x86_64-apple-macosx10.12.0"22 23; Function Attrs: noinline nounwind optnone ssp uwtable24define void @f() #0 !dbg !8 {25entry:26  %a = alloca i16, align 427  %b = alloca i16, align 428  call void @llvm.dbg.declare(metadata ptr %a, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 16)), !dbg !1429  store i16 1, ptr %a, align 4, !dbg !1430  call void @llvm.dbg.declare(metadata ptr %b, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 16, 16)), !dbg !1631  call void @llvm.dbg.declare(metadata ptr %a, metadata !11, metadata !13), !dbg !1732  store i16 2, ptr %b, align 4, !dbg !1733  ret void34}35 36; Function Attrs: nounwind readnone speculatable37declare void @llvm.dbg.declare(metadata, metadata, metadata) #138 39attributes #0 = { noinline nounwind optnone ssp uwtable }40attributes #1 = { nounwind readnone speculatable }41 42!llvm.dbg.cu = !{!0}43!llvm.module.flags = !{!3, !4, !5, !6}44 45!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "adrian", emissionKind: FullDebug)46!1 = !DIFile(filename: "/tmp/t.c", directory: "/")47!3 = !{i32 2, !"Dwarf Version", i32 4}48!4 = !{i32 2, !"Debug Info Version", i32 3}49!5 = !{i32 1, !"wchar_size", i32 4}50!6 = !{i32 7, !"PIC Level", i32 2}51!8 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0)52!9 = !DISubroutineType(types: !10)53!10 = !{null}54!11 = !DILocalVariable(name: "a", scope: !8, file: !1, line: 2, type: !12)55!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)56!13 = !DIExpression()57!14 = !DILocation(line: 2, column: 7, scope: !8)58!15 = !DILocalVariable(name: "b", scope: !8, file: !1, line: 3, type: !12)59!16 = !DILocation(line: 3, column: 7, scope: !8)60!17 = !DILocation(line: 3, column: 7, scope: !8, inlinedAt: !16)61