brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 904187a Raw
52 lines · plain
1; RUN: llc -dwarf-version=5 -debugger-tune=lldb -mtriple x86_64-unknown-linux-gnu -O0 -filetype=obj -o %t_2_le.o %s2; RUN: llvm-dwarfdump -v -debug-info %t_2_le.o | FileCheck %s3 4; Produced at -O0 from:5; struct __attribute__((packed)) bitfield {6; 	int i:1;7; 	int j:32;8; } bitfield;9 10; CHECK: DW_TAG_member11; CHECK-NEXT: DW_AT_name{{.*}}"i"12; CHECK-NOT: DW_TAG_member13; CHECK: DW_AT_bit_size   {{.*}} (0x01)14; CHECK-NEXT: DW_AT_data_bit_offset {{.*}} (0x00)15 16; CHECK: DW_TAG_member17; CHECK-NEXT: DW_AT_name{{.*}}"j"18; CHECK-NOT: DW_TAG_member19; CHECK: DW_AT_bit_size   {{.*}} (0x20)20; CHECK-NEXT: DW_AT_data_bit_offset {{.*}} (0x01)21 22; ModuleID = 'packed_bitfields2.c'23source_filename = "packed_bitfields2.c"24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"25target triple = "x86_64-pc-linux-gnu"26 27%struct.bitfield = type { [5 x i8] }28 29@bitfield = dso_local global %struct.bitfield zeroinitializer, align 1, !dbg !030 31!llvm.dbg.cu = !{!2}32!llvm.module.flags = !{!11, !12, !13, !14, !15}33!llvm.ident = !{!16}34 35!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())36!1 = distinct !DIGlobalVariable(name: "bitfield", scope: !2, file: !3, line: 4, type: !6, isLocal: false, isDefinition: true)37!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 11.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None, sysroot: "/")38!3 = !DIFile(filename: "packed_bitfields2.c", directory: "/")39!4 = !{}40!5 = !{!0}41!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "bitfield", file: !3, line: 1, size: 40, elements: !7)42!7 = !{!8, !10}43!8 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !6, file: !3, line: 2, baseType: !9, size: 1, flags: DIFlagBitField, extraData: i64 0)44!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)45!10 = !DIDerivedType(tag: DW_TAG_member, name: "j", scope: !6, file: !3, line: 3, baseType: !9, size: 32, offset: 1, flags: DIFlagBitField, extraData: i64 0)46!11 = !{i32 7, !"Dwarf Version", i32 5}47!12 = !{i32 2, !"Debug Info Version", i32 3}48!13 = !{i32 1, !"wchar_size", i32 4}49!14 = !{i32 7, !"PIC Level", i32 2}50!15 = !{i32 7, !"PIE Level", i32 2}51!16 = !{!"clang version 11.0.1"}52