[flang] Dump parse tree even if semantic error occurs
When -fdebug-dump-parse-tree is specified, dump the parse tree even if semantic errors have occurred. This is necessary to see the parse tree after it has been transformed. Original-commit: flang-compiler/f18@bbdb0717da Reviewed-on: https://github.com/flang-compiler/f18/pull/417
This commit is contained in:
parent
fab062244b
commit
79826a73b2
|
@ -232,6 +232,9 @@ std::string CompileFortran(std::string path, Fortran::parser::Options options,
|
|||
if (semantics.AnyFatalError()) {
|
||||
std::cerr << driver.prefix << "semantic errors in " << path << '\n';
|
||||
exitStatus = EXIT_FAILURE;
|
||||
if (driver.dumpParseTree) {
|
||||
Fortran::parser::DumpTree(std::cout, parseTree);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
if (driver.dumpUnparseWithSymbols) {
|
||||
|
|
Loading…
Reference in a new issue