1;; This test checks dataLocation field of DICompositeType 2 3; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s 4 5;; Test whether DW_AT_data_location is generated. 6; CHECK: !DICompositeType(tag: DW_TAG_array_type, baseType: !{{[0-9]+}}, size: 32, align: 32, elements: !{{[0-9]+}}, dataLocation: !{{[0-9]+}}) 7; CHECK: !DICompositeType(tag: DW_TAG_array_type, baseType: !{{[0-9]+}}, size: 32, align: 32, elements: !{{[0-9]+}}, dataLocation: !DIExpression(DW_OP_constu, 3412)) 8 9; ModuleID = 'dataLocation.f90' 10source_filename = "/dir/dataLocation.ll" 11 12!llvm.module.flags = !{!0, !1} 13!llvm.dbg.cu = !{!2} 14 15!0 = !{i32 2, !"Dwarf Version", i32 4} 16!1 = !{i32 2, !"Debug Info Version", i32 3} 17!2 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !4, imports: !4) 18!3 = !DIFile(filename: "fortsubrange.f90", directory: "/dir") 19!4 = !{} 20!5 = !{!6, !16} 21!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !8, dataLocation: !10) 22!7 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed) 23!8 = !{!9} 24!9 = !DISubrange(count: 19, lowerBound: 2) 25!10 = distinct !DILocalVariable(scope: !11, file: !3, type: !15, flags: DIFlagArtificial) 26!11 = !DILexicalBlock(scope: !12, file: !3, line: 1, column: 1) 27!12 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !13, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !2) 28!13 = !DISubroutineType(cc: DW_CC_program, types: !14) 29!14 = !{null} 30!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32) 31!16 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !8, dataLocation: !DIExpression(DW_OP_constu, 3412)) 32