1e59744fdSSourabh Singh Tomar; This test checks attributes of a Fortran module. 2*01cee921SDavid Blaikie; RUN: llc %s -filetype=obj -o - | \ 3e59744fdSSourabh Singh Tomar; RUN: llvm-dwarfdump - | FileCheck %s 4e59744fdSSourabh Singh Tomar 5e59744fdSSourabh Singh Tomar; CHECK: DW_TAG_module 6e59744fdSSourabh Singh Tomar; CHECK-NEXT: DW_AT_name ("dummy") 7a520c89aSRussell Gallop; CHECK-NEXT: DW_AT_decl_file ("/fortran{{[/\\]}}module.f90") 8e59744fdSSourabh Singh Tomar; CHECK-NEXT: DW_AT_decl_line (2) 9e59744fdSSourabh Singh Tomar 10e59744fdSSourabh Singh Tomar; Generated from flang compiler, Fortran source to regenerate: 11e59744fdSSourabh Singh Tomar; module dummy 12e59744fdSSourabh Singh Tomar; integer :: foo 13e59744fdSSourabh Singh Tomar; end module dummy 14e59744fdSSourabh Singh Tomar 15e59744fdSSourabh Singh Tomar; ModuleID = '/tmp/module-b198fa.ll' 16e59744fdSSourabh Singh Tomarsource_filename = "/tmp/module-b198fa.ll" 17e59744fdSSourabh Singh Tomartarget datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 18e59744fdSSourabh Singh Tomartarget triple = "x86_64-unknown-linux-gnu" 19e59744fdSSourabh Singh Tomar 20e59744fdSSourabh Singh Tomar%struct_dummy_0_ = type <{ [4 x i8] }> 21e59744fdSSourabh Singh Tomar 22e59744fdSSourabh Singh Tomar@_dummy_0_ = common global %struct_dummy_0_ zeroinitializer, align 64, !dbg !0 23e59744fdSSourabh Singh Tomar 24e59744fdSSourabh Singh Tomar; Function Attrs: noinline 25e59744fdSSourabh Singh Tomardefine float @dummy_() #0 { 26e59744fdSSourabh Singh Tomar.L.entry: 27e59744fdSSourabh Singh Tomar ret float undef 28e59744fdSSourabh Singh Tomar} 29e59744fdSSourabh Singh Tomar 30e59744fdSSourabh Singh Tomarattributes #0 = { noinline "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" } 31e59744fdSSourabh Singh Tomar 32e59744fdSSourabh Singh Tomar!llvm.module.flags = !{!8, !9} 33e59744fdSSourabh Singh Tomar!llvm.dbg.cu = !{!3} 34e59744fdSSourabh Singh Tomar 35e59744fdSSourabh Singh Tomar!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 36e59744fdSSourabh Singh Tomar!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !4, type: !7, isLocal: false, isDefinition: true) 37e59744fdSSourabh Singh Tomar!2 = !DIModule(scope: !3, name: "dummy", file: !4, line: 2) 38e59744fdSSourabh Singh Tomar!3 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !4, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5) 39e59744fdSSourabh Singh Tomar!4 = !DIFile(filename: "module.f90", directory: "/fortran") 40e59744fdSSourabh Singh Tomar!5 = !{} 41e59744fdSSourabh Singh Tomar!6 = !{!0} 42e59744fdSSourabh Singh Tomar!7 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed) 43e59744fdSSourabh Singh Tomar!8 = !{i32 2, !"Dwarf Version", i32 4} 44e59744fdSSourabh Singh Tomar!9 = !{i32 2, !"Debug Info Version", i32 3} 45