llvm-project/flang/test/Transforms/debug-extra-global.fir
Sergio Afonso 4923cffc1d
[Flang] Add missing dependency to AddDebugInfo pass (#139099)
The `AddDebugInfo` pass currently has a dependency on the `DLTI` MLIR
dialect caused by a call to the `fir::support::getOrSetMLIRDataLayout()`
utility function.

This dependency is not captured in the pass definition. This patch adds
the dependency and simplifies several unit tests that had to explicitly
use the `DLTI` dialect to prevent the missing dependency from causing
compiler failures.
2025-05-09 12:19:53 +01:00

19 lines
596 B
Plaintext

// RUN: fir-opt --add-debug-info --mlir-print-debuginfo %s | FileCheck %s
module {
fir.global linkonce_odr @_QFEXnXxcx constant target : !fir.char<1,3> {
%0 = fir.string_lit "xcx"(3) : !fir.char<1,3>
fir.has_value %0 : !fir.char<1,3>
} loc(#loc1)
fir.global linkonce_odr @_QFEXnXxdtx constant target : !fir.char<1,4> {
%0 = fir.string_lit "xdtx"(4) : !fir.char<1,4>
fir.has_value %0 : !fir.char<1,4>
} loc(#loc1)
}
#loc1 = loc("derived.f90":24:1)
// Test that no di_global_variable gets created for these compile generated
// globals.
// CHECK-NOT: #di_global_variable