39 lines · plain
1; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s2; REQUIRES: object-emission3 4;; Check base types with bit-sizes that don't fit fully fit within a byte5;; multiple get both a a byte_size and bit_size attribute.6 7; CHECK: DW_TAG_base_type8; CHECK-NEXT: DW_AT_name ("unsigned _BitInt")9; CHECK-NEXT: DW_AT_encoding (DW_ATE_unsigned)10; CHECK-NEXT: DW_AT_byte_size (0x04)11; CHECK-NEXT: DW_AT_bit_size (0x11)12 13; CHECK: DW_TAG_base_type14; CHECK-NEXT: DW_AT_name ("_BitInt")15; CHECK-NEXT: DW_AT_encoding (DW_ATE_signed)16; CHECK-NEXT: DW_AT_byte_size (0x01)17; CHECK-NEXT: DW_AT_bit_size (0x02)18 19@a = global i8 0, align 1, !dbg !020@b = global i8 0, align 1, !dbg !521 22!llvm.dbg.cu = !{!2}23!llvm.module.flags = !{!10, !11}24!llvm.ident = !{!12}25 26!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())27!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !7, line: 4, type: !9, isLocal: false, isDefinition: true)28!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 22.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)29!3 = !DIFile(filename: "bit-int.c", directory: "/")30!4 = !{!0, !5}31!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())32!6 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !7, line: 5, type: !8, isLocal: false, isDefinition: true)33!7 = !DIFile(filename: "bit-int.c", directory: "/")34!8 = !DIBasicType(name: "_BitInt", size: 8, dataSize: 2, encoding: DW_ATE_signed)35!9 = !DIBasicType(name: "unsigned _BitInt", size: 32, dataSize: 17, encoding: DW_ATE_unsigned)36!10 = !{i32 2, !"Debug Info Version", i32 3}37!11 = !{i32 1, !"wchar_size", i32 4}38!12 = !{!"clang version 22.0.0git"}39