aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPeter Klausler <35819229+klausler@users.noreply.github.com>2024-05-15 15:44:37 -0700
committerGitHub <noreply@github.com>2024-05-15 15:44:37 -0700
commite00a3ccf43563209b71c5b68f56d83f4052dca63 (patch)
tree5729f1012e0a0fcd56901ab7afe63b7595012ccb /flang/lib/Frontend/CompilerInvocation.cpp
parent0585eed9409c1362f7deaabc42c1d3c3f55c4b6c (diff)
downloadllvm-e00a3ccf43563209b71c5b68f56d83f4052dca63.zip
llvm-e00a3ccf43563209b71c5b68f56d83f4052dca63.tar.gz
llvm-e00a3ccf43563209b71c5b68f56d83f4052dca63.tar.bz2
[flang] New -fdebug-unparse-with-modules option (#91660)
This option is a compilation action that parses a source file and performs semantic analysis on it, like the existing -fdebug-unparse option does. Its output, however, is preceded by the effective contents of all of the non-intrinsic modules on which it depends but does not define, transitively preceded by the closure of all of those modules' dependencies. The output from this option is therefore the analyzed parse tree for a source file encapsulated with all of its non-intrinsic module dependencies. This output may be useful for extracting code from large applications for use as an attachment to a bug report, or as input to a test case reduction tool for problem isolation.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index db7fd3c..e8a8c90 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -488,6 +488,9 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
case clang::driver::options::OPT_fdebug_unparse_with_symbols:
opts.programAction = DebugUnparseWithSymbols;
break;
+ case clang::driver::options::OPT_fdebug_unparse_with_modules:
+ opts.programAction = DebugUnparseWithModules;
+ break;
case clang::driver::options::OPT_fdebug_dump_symbols:
opts.programAction = DebugDumpSymbols;
break;