| 1 |
|
| 2 |
// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s |
| 3 |
// REQUIRES: system-linux |
| 4 |
|
| 5 |
// Test that there are no changes to a function with existed fused loc debug |
| 6 |
module { |
| 7 |
func.func @_QPs1() { |
| 8 |
return loc(#loc1) |
| 9 |
} loc(#loc2) |
| 10 |
} loc(#loc) |
| 11 |
#di_basic_type = #llvm.di_basic_type<tag = DW_TAG_base_type, name = "void", encoding = DW_ATE_address> |
| 12 |
#di_file = #llvm.di_file<"simple.f90" in "/home/user01/llvm-project/build_release"> |
| 13 |
#loc = loc("/home/user01/llvm-project/build_release/simple.f90":0:0) |
| 14 |
#loc1 = loc("/home/user01/llvm-project/build_release/simple.f90":1:1) |
| 15 |
#di_compile_unit = #llvm.di_compile_unit<id = distinct[0]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "Flang", isOptimized = false, emissionKind = LineTablesOnly> |
| 16 |
#di_subroutine_type = #llvm.di_subroutine_type<callingConvention = DW_CC_normal, types = #di_basic_type, #di_basic_type> |
| 17 |
#di_subprogram = #llvm.di_subprogram<compileUnit = #di_compile_unit, scope = #di_file, name = "_QPs1", linkageName = "_QPs1", file = #di_file, line = 1, scopeLine = 1, subprogramFlags = Definition, type = #di_subroutine_type> |
| 18 |
#loc2 = loc(fused<#di_subprogram>[#loc1]) |
| 19 |
|
| 20 |
// CHECK: #loc = loc("/home/user01/llvm-project/build_release/simple.f90":0:0) |
| 21 |
// CHECK: #loc1 = loc("/home/user01/llvm-project/build_release/simple.f90":1:1) |
| 22 |
// CHECK: #di_subprogram = #llvm.di_subprogram<compileUnit = #di_compile_unit, scope = #di_file, name = "_QPs1", linkageName = "_QPs1", file = #di_file, line = 1, scopeLine = 1, subprogramFlags = Definition, type = #di_subroutine_type> |
| 23 |
// CHECK: #loc2 = loc(fused<#di_subprogram>[#loc1]) |