Files
llvm-project/flang/test/Transforms/debug-dwarf-debug-flags.fir
Yangyu Chen 7f0a343a8e [flang] Implement -grecord-command-line for Flang (#181686)
Enable Flang to match Clang behavior for command-line recording in DWARF
producer strings when using -grecord-command-line.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
2026-02-28 01:45:52 +08:00

15 lines
518 B
Plaintext

// Test the dwarf-debug-flags option will show up in the generated debug info.
// RUN: fir-opt --add-debug-info="debug-level=Full dwarf-debug-flags=\"-grecord-command-line -O2\"" \
// RUN: --mlir-print-debuginfo %s | FileCheck --check-prefix=CHECK-FLAGS %s
module {
func.func @_QPs() {
return loc(#loc_s)
} loc(#loc_s)
} loc(#loc_module)
#loc_module = loc("simple.f90":1:1)
#loc_s = loc("simple.f90":2:1)
// CHECK-FLAGS: #llvm.di_compile_unit<
// CHECK-FLAGS: producer = "{{.*}} -grecord-command-line -O2"