[PATCH] D120051: [flang][driver] Make `flang-new` always generate run-time type info

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 06:17:41 PST 2022


awarzynski created this revision.
awarzynski added reviewers: rovka, jeanPerier, Leporacanthicus, PeteSteinfeld.
Herald added a reviewer: sscalpone.
Herald added a project: Flang.
awarzynski requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

Currently, the driver generates the tables with "run-time type
information for derived types" only when specific actions are run.
However, the corresponding data might be required by the subsequent
compilation stages (e.g. lowering, code-gen) and should be generated
unconditionally. Note that this is only possible once the semantic
checks have been run.

Note that when generating these tables, extra semantic errors might be
generated. The driver will always report these and in most cases such
semantic errors will cause the driver to exit immediately. The only
exception are actions inheriting from `PrescanAndSemaDebugAction`.
Currently, there's only one such action: `DebugDumpAllAction`
(corresponds to `-fdebug-dump-all` command-line flag). I've updated the
comments for this action to clarify this.

This change will mostly affect lowering, which currently is only
available for most basic examples (e.g. empty programs). I wasn't able
to find a working case that would demonstrate the new behaviour. I
hope that this change is straightforward enough and am submitting it
without a test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120051

Files:
  flang/include/flang/Frontend/CompilerInstance.h
  flang/include/flang/Frontend/FrontendAction.h
  flang/include/flang/Frontend/FrontendActions.h
  flang/lib/Frontend/FrontendAction.cpp
  flang/lib/Frontend/FrontendActions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120051.409620.patch
Type: text/x-patch
Size: 6685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220217/813c2035/attachment.bin>


More information about the llvm-commits mailing list