forked from OSchip/llvm-project
6f8ef1d6e8
This patch adds a new abstract class for frontend actions: `PrescanAndSemaDebugAction`. It's almost identical to `PrescanAndSemaAction`, but in the presence of semantic errors it does not skip the corresponding `ExecuteAction` specialisation. Instead, it runs it as if there were no semantic errors. This class is for developer actions only (i.e. front-end driver options). The new behaviour does not affect the return code from `flang-new -fc1` when the input file is semantically incorrect. The return code is inferred from the number of driver diagnostics generated in `CompilerInstance::ExecuteAction` and this patch does not change that. More specifically, the semantic errors are still reported and hence the driver is able to correctly report that the compilation has failed (with a non-zero return code). This new base class is meant for debug actions only and `DebugDumpAllAction` is updated to demonstrate the new behaviour. With this change, `flang-new -fc1 -fdebug-dump-all` dumps the parse tree and symbols for all input files, regardless of whether any semantic errors were found. This patch addresses https://bugs.llvm.org/show_bug.cgi?id=52097. Differential Revision: https://reviews.llvm.org/D111308 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CompilerInstance.cpp | ||
CompilerInvocation.cpp | ||
FrontendAction.cpp | ||
FrontendActions.cpp | ||
FrontendOptions.cpp | ||
TextDiagnostic.cpp | ||
TextDiagnosticBuffer.cpp | ||
TextDiagnosticPrinter.cpp |