aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFModuleDefinition.cpp
diff options
context:
space:
mode:
authorAndrzej Warzynski <andrzej.warzynski@arm.com>2021-10-07 11:33:07 +0000
committerAndrzej Warzynski <andrzej.warzynski@arm.com>2021-10-11 11:52:05 +0000
commit6f8ef1d6e8796993b69d4b1cf8e56590273268e3 (patch)
tree986385ecdb3536493fbe09ba1a7b56109d9e38bb /llvm/lib/Object/COFFModuleDefinition.cpp
parent3256aa8fe6fd785df12cc39f95e55bef0bc371c2 (diff)
downloadllvm-6f8ef1d6e8796993b69d4b1cf8e56590273268e3.zip
llvm-6f8ef1d6e8796993b69d4b1cf8e56590273268e3.tar.gz
llvm-6f8ef1d6e8796993b69d4b1cf8e56590273268e3.tar.bz2
[flang][driver] Add actions that execute despite semantic errors
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
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
0 files changed, 0 insertions, 0 deletions