2015-04-14 11:18:17 +02:00
; RUN: opt -analyze -module-debuginfo < %s | FileCheck %s
; This module is generated from the following c-code:
;
; > union X;
; >
; > struct Y {
; > union X *x;
; > };
; >
; > struct Y y;
; CHECK: Type: Y from /tmp/minimal.c:3 DW_TAG_structure_type
; CHECK: Type: x from /tmp/minimal.c:4 DW_TAG_member
; CHECK: Type: DW_TAG_pointer_type
; CHECK: Type: X from /tmp/minimal.c:1 DW_TAG_structure_type
2016-12-22 01:45:21 +01:00
source_filename = "test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll"
2015-04-14 11:18:17 +02:00
%struct.Y = type { %struct.X * }
%struct.X = type opaque
2016-12-22 01:45:21 +01:00
@y = common global %struct.Y zeroinitializer , align 8 , !dbg !0
!llvm.dbg.cu = ! { !2 }
!llvm.module.flags = ! { !11 , !12 }
!llvm.ident = ! { !13 }
2017-08-30 20:06:51 +02:00
!0 = !DIGlobalVariableExpression ( var: !1 , expr: !DIExpression ( ) )
2016-12-22 01:45:21 +01:00
!1 = !DIGlobalVariable ( name: "y" , scope: !2 , file: !3 , line: 7 , type: !6 , isLocal: false , isDefinition: true )
2019-01-15 17:18:52 +01:00
!2 = distinct !DICompileUnit ( language: D W _ L A N G _ C 99 , file: !3 , producer: "clang version 3.7.0" , isOptimized: false , runtimeVersion: 0 , emissionKind: F u l l D e b u g , enums: !4 , retainedTypes: !4 , globals: !5 , imports: !4 )
2016-12-22 01:45:21 +01:00
!3 = !DIFile ( filename: "minimal.c" , directory: "/tmp" )
!4 = ! { }
!5 = ! { !0 }
!6 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "Y" , file: !3 , line: 3 , size: 64 , align: 64 , elements: !7 )
!7 = ! { !8 }
!8 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "x" , scope: !6 , file: !3 , line: 4 , baseType: !9 , size: 64 , align: 64 )
!9 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , baseType: !10 , size: 64 , align: 64 )
!10 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "X" , file: !3 , line: 1 , flags: D I F l a g F w d D e c l )
!11 = ! { i32 2 , !"Dwarf Version" , i32 4 }
!12 = ! { i32 2 , !"Debug Info Version" , i32 3 }
2019-01-15 17:18:52 +01:00
!13 = ! { !"clang version 3.7.0" }
2016-12-22 01:45:21 +01:00