2014-11-24 04:08:18 -05:00
; RUN: %llc_dwarf -O0 < %s | FileCheck %s
2011-05-02 15:34:44 -04:00
; Do not emit AT_upper_bound for an unbounded array.
; radar 9241695
2015-12-30 06:46:15 -05:00
define i32 @main ( ) nounwind ssp !dbg !0 {
2011-05-02 15:34:44 -04:00
entry:
%retval = alloca i32 , align 4
%a = alloca [ 0 x i32 ] , align 4
store i32 0 , i32 * %retval
2015-05-27 14:44:32 -04:00
call void @llvm.dbg.declare ( metadata [ 0 x i32 ] * %a , metadata !6 , metadata !DIExpression ( ) ) , !dbg !11
2011-05-02 15:34:44 -04:00
ret i32 0 , !dbg !12
}
2015-01-18 11:17:27 -05:00
declare void @llvm.dbg.declare ( metadata , metadata , metadata ) nounwind readnone
2011-05-02 15:34:44 -04:00
2013-04-08 14:41:23 -04:00
!llvm.dbg.cu = ! { !2 }
2013-12-21 19:04:03 -05:00
!llvm.module.flags = ! { !16 }
2011-05-02 15:34:44 -04:00
2015-12-30 06:46:15 -05:00
!0 = distinct !DISubprogram ( name: "main" , line: 3 , isLocal: false , isDefinition: true , virtualIndex: 6 , isOptimized: false , scopeLine: 3 , file: !14 , scope: !1 , type: !3 )
2015-05-27 14:44:32 -04:00
!1 = !DIFile ( filename: "array.c" , directory: "/private/tmp" )
2015-12-30 06:46:15 -05:00
!2 = distinct !DICompileUnit ( language: D W _ L A N G _ C 99 , producer: "clang version 3.0 (trunk 129138)" , isOptimized: false , emissionKind: 0 , file: !14 , enums: !15 , retainedTypes: !15 , subprograms: !13 , imports: null )
2015-05-27 14:44:32 -04:00
!3 = !DISubroutineType ( types: !4 )
2015-01-18 11:17:27 -05:00
!4 = ! { !5 }
2015-05-27 14:44:32 -04:00
!5 = !DIBasicType ( tag: D W _ T A G _ b a s e _ type , name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
2015-12-30 06:46:15 -05:00
!6 = !DILocalVariable ( name: "a" , line: 4 , scope: !7 , file: !1 , type: !8 )
2015-05-27 14:44:32 -04:00
!7 = distinct !DILexicalBlock ( line: 3 , column: 12 , file: !14 , scope: !0 )
!8 = !DICompositeType ( tag: D W _ T A G _ a r r a y _ type , align: 32 , file: !14 , scope: !2 , baseType: !5 , elements: !9 )
2015-01-18 11:17:27 -05:00
!9 = ! { !10 }
2015-05-27 14:44:32 -04:00
;CHECK: section_info:
2011-05-02 15:34:44 -04:00
;CHECK: DW_TAG_subrange_type
;CHECK-NEXT: DW_AT_type
;CHECK-NOT: DW_AT_lower_bound
;CHECK-NOT: DW_AT_upper_bound
;CHECK-NEXT: End Of Children Mark
2015-05-27 14:44:32 -04:00
!10 = !DISubrange ( count: -1 )
!11 = !DILocation ( line: 4 , column: 7 , scope: !7 )
!12 = !DILocation ( line: 5 , column: 3 , scope: !7 )
2015-01-18 11:17:27 -05:00
!13 = ! { !0 }
2015-05-27 14:44:32 -04:00
!14 = !DIFile ( filename: "array.c" , directory: "/private/tmp" )
!15 = ! { }
!16 = ! { i32 1 , !"Debug Info Version" , i32 3 }