2016-05-18 04:12:08 +08:00
; RUN: llc -O0 -filetype=obj -mtriple=armeb-none-freebsd -debugger-tune=lldb %s -o - \
2017-09-12 07:05:20 +08:00
; RUN: | llvm-dwarfdump -v --debug-info - | FileCheck %s
2016-04-28 23:37:48 +08:00
; Generated from:
; struct S {
; int j:5;
; int k:6;
; int m:5;
; int n:8;
; } s;
2016-12-22 08:45:21 +08:00
source_filename = "test/DebugInfo/ARM/big-endian-bitfield.ll"
2016-04-28 23:37:48 +08:00
target datalayout = "E-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
%struct.S = type { i24 }
2016-12-22 08:45:21 +08:00
@s = common global %struct.S zeroinitializer , align 4 , !dbg !0
2016-04-28 23:37:48 +08:00
2016-12-22 08:45:21 +08:00
!llvm.dbg.cu = ! { !2 }
!llvm.module.flags = ! { !13 , !14 , !15 }
!llvm.ident = ! { !16 }
2016-04-28 23:37:48 +08:00
2017-08-31 02:06:51 +08:00
!0 = distinct !DIGlobalVariableExpression ( var: !1 , expr: !DIExpression ( ) )
2016-12-22 08:45:21 +08:00
!1 = !DIGlobalVariable ( name: "s" , scope: !2 , file: !3 , line: 6 , type: !6 , isLocal: false , isDefinition: true )
!2 = distinct !DICompileUnit ( language: D W _ L A N G _ C 99 , file: !3 , producer: "clang version 3.9.0 (trunk 267633)" , isOptimized: false , runtimeVersion: 0 , emissionKind: F u l l D e b u g , enums: !4 , globals: !5 )
!3 = !DIFile ( filename: "bitfield.c" , directory: "/Volumes/Data/llvm" )
!4 = ! { }
!5 = ! { !0 }
!6 = distinct !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "S" , file: !3 , line: 1 , size: 32 , elements: !7 )
!7 = ! { !8 , !10 , !11 , !12 }
!8 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "j" , scope: !6 , file: !3 , line: 2 , baseType: !9 , size: 5 )
2016-04-28 23:37:48 +08:00
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"j"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x00)
2016-12-22 08:45:21 +08:00
!9 = !DIBasicType ( name: "int" , size: 32 , encoding: D W _ A T E _ s i g n e d )
!10 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "k" , scope: !6 , file: !3 , line: 3 , baseType: !9 , size: 6 , offset: 5 )
!11 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "m" , scope: !6 , file: !3 , line: 4 , baseType: !9 , size: 5 , offset: 11 )
!12 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "n" , scope: !6 , file: !3 , line: 5 , baseType: !9 , size: 8 , offset: 16 )
!13 = ! { i32 2 , !"Dwarf Version" , i32 4 }
2016-04-28 23:37:48 +08:00
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"k"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x05)
2016-12-22 08:45:21 +08:00
!14 = ! { i32 2 , !"Debug Info Version" , i32 3 }
2016-04-28 23:37:48 +08:00
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"m"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x0b)
2016-12-22 08:45:21 +08:00
!15 = ! { i32 1 , !"PIC Level" , i32 2 }
2016-04-28 23:37:48 +08:00
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"n"
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_data_bit_offset [DW_FORM_data1] (0x10)
2016-12-22 08:45:21 +08:00
!16 = ! { !"clang version 3.9.0 (trunk 267633)" }