diff options
author | Abid Qadeer <haqadeer@amd.com> | 2025-09-15 15:57:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-15 15:57:33 +0100 |
commit | 99ec5b95da4fa4e32cf9854513413510d48781f6 (patch) | |
tree | c66da2d2ce1f46fad681c238aec361a85cfab6c5 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0cca9e4baa0073a5a6f46b1b09dbd6ed290ae619 (diff) | |
download | llvm-99ec5b95da4fa4e32cf9854513413510d48781f6.zip llvm-99ec5b95da4fa4e32cf9854513413510d48781f6.tar.gz llvm-99ec5b95da4fa4e32cf9854513413510d48781f6.tar.bz2 |
[flang][driver] Support -gdwarf-N option. (#158314)
This PR adds the support for -gdwarf-N option where allows user to
choose the version of the dwarf. Currently N can be 2, 3, 4, or 5. This
is only the driver part of the change. Later PRs will propogate it to
the IR.
Fixes https://github.com/llvm/llvm-project/issues/112910.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 4f42fbd..a00e568 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -157,6 +157,10 @@ static bool parseDebugArgs(Fortran::frontend::CodeGenOptions &opts, clang::DiagnosticsEngine::Warning, "Unsupported debug option: %0"); diags.Report(debugWarning) << arg->getValue(); } + // The default value of 2 here is to match clang. + opts.DwarfVersion = + getLastArgIntValue(args, clang::driver::options::OPT_dwarf_version_EQ, + /*Default=*/2, diags); } return true; } |