brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.2 KiB · 5af1a43 Raw
99 lines · plain
1;; This test checks processing of DIImportedEntity with elements field.2; REQUIRES: x86_64-linux3 4; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s5 6; CHECK: !DIImportedEntity(tag: DW_TAG_imported_module7; CHECK-SAME: elements: [[ELEMENTS:![0-9]+]]8; CHECK: [[ELEMENTS]] = !{[[ELEMENT:![0-9]+]]}9; CHECK: [[ELEMENT]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "var4"10 11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12;;This test case is generated from13;;module mymod14;;  integer :: var1 = 1115;;  integer :: var2 = 1216;;  integer :: var3 = 1317;;end module mymod18;;19;;Program main20;;  call use_renamed()21;;  contains22;;    subroutine use_renamed()23;;      use mymod, var4 => var124;;      print *, var425;;    end subroutine use_renamed26;;end program main27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28 29; ModuleID = 'DIImportedEntity_elements.ll'30source_filename = "/tmp/usemodulealias.ll"31 32%struct_mymod_8_ = type <{ [12 x i8] }>33%struct.struct_ul_MAIN__348 = type { i8* }34 35@_mymod_8_ = global %struct_mymod_8_ <{ [12 x i8] c"\0B\00\00\00\0C\00\00\00\0D\00\00\00" }>, align 64, !dbg !0, !dbg !7, !dbg !1036@.C330_MAIN_ = internal constant i32 037@.C364_main_use_renamed = internal constant i32 2538@.C330_main_use_renamed = internal constant i32 039@.C331_main_use_renamed = internal constant i64 040@.C359_main_use_renamed = internal constant i32 641@.C357_main_use_renamed = internal constant [18 x i8] c"usemodulealias.f90"42@.C352_main_use_renamed = internal constant i32 1243 44define i32 @mymod_() {45.L.entry:46  ret i32 undef47}48 49define void @MAIN_() !dbg !15 {50L.entry:51  %.S0000_353 = alloca %struct.struct_ul_MAIN__348, align 852  %0 = bitcast i32* @.C330_MAIN_ to i8*53  %1 = bitcast void (...)* @fort_init to void (i8*, ...)*54  call void (i8*, ...) %1(i8* %0)55  br label %L.LB2_35756 57L.LB2_357:                                        ; preds = %L.entry58  %2 = bitcast %struct.struct_ul_MAIN__348* %.S0000_353 to i64*, !dbg !2359  call void @main_use_renamed(i64* %2), !dbg !2360  ret void, !dbg !2461}62 63define internal void @main_use_renamed(i64* noalias %.S0000) !dbg !14 {64L.entry:65  ret void, !dbg !2566}67 68declare void @fort_init(...)69 70!llvm.module.flags = !{!21, !22}71!llvm.dbg.cu = !{!4}72 73!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())74!1 = distinct !DIGlobalVariable(name: "var1", scope: !2, file: !3, line: 2, type: !9, isLocal: false, isDefinition: true)75!2 = !DIModule(scope: !4, name: "mymod", file: !3, line: 1)76!3 = !DIFile(filename: "DIImportedEntity_elements.f90", directory: "/tmp")77!4 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, flags: "'+flang usemodulealias.f90 -g -S -emit-llvm'", runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !12, nameTableKind: None)78!5 = !{}79!6 = !{!0, !7, !10}80!7 = !DIGlobalVariableExpression(var: !8, expr: !DIExpression(DW_OP_plus_uconst, 4))81!8 = distinct !DIGlobalVariable(name: "var2", scope: !2, file: !3, line: 3, type: !9, isLocal: false, isDefinition: true)82!9 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed)83!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression(DW_OP_plus_uconst, 8))84!11 = distinct !DIGlobalVariable(name: "var3", scope: !2, file: !3, line: 4, type: !9, isLocal: false, isDefinition: true)85!12 = !{!13}86!13 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !14, entity: !2, file: !3, line: 10, elements: !19)87!14 = distinct !DISubprogram(name: "use_renamed", scope: !15, file: !3, line: 10, type: !18, scopeLine: 10, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4)88!15 = distinct !DISubprogram(name: "main", scope: !4, file: !3, line: 7, type: !16, scopeLine: 7, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !4)89!16 = !DISubroutineType(cc: DW_CC_program, types: !17)90!17 = !{null}91!18 = !DISubroutineType(types: !17)92!19 = !{!20}93!20 = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "var4", scope: !14, entity: !1, file: !3, line: 10)94!21 = !{i32 2, !"Dwarf Version", i32 4}95!22 = !{i32 2, !"Debug Info Version", i32 3}96!23 = !DILocation(line: 8, column: 1, scope: !15)97!24 = !DILocation(line: 9, column: 1, scope: !15)98!25 = !DILocation(line: 13, column: 1, scope: !14)99