Files
clang-p2996/flang/test/Transforms/debug-line-table-inc-same-file.fir
Kiran Chandramohan 3af9dfe464 [Flang][Debug] Use pathnames from location of functions
This ensures that functions in included files have the correct path
in their file metadata.

Note: This patch also sets all locations to have the full path names.

Reviewed By: vzakhari, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D142263
2023-01-25 13:49:21 +00:00

24 lines
729 B
Plaintext

// RUN: fir-opt --add-debug-foundation --mlir-print-debuginfo %s | FileCheck %s
// REQUIRES: linux
// Test that there is only one FileAttribute generated for multiple functions
// in the same file.
module attributes {} {
func.func @_QPs1() {
return loc(#loc2)
} loc(#loc1)
func.func @_QPs2() {
return loc(#loc2)
} loc(#loc1)
func.func @_QQmain() {
return loc(#loc3)
} loc(#loc1)
} loc(#loc)
#loc = loc("/home/user01/llvm-project/build_release/simple.f90":0:0)
#loc1 = loc("/home/user01/llvm-project/build_release/simple.f90":1:1)
#loc2 = loc("/home/user01/llvm-project/build_release/simple.f90":2:1)
#loc3 = loc("/home/user01/llvm-project/build_release/simple.f90":3:1)
// CHECK-COUNT-1: #llvm.di_file