[flang-commits] [flang] ef4318e - [flang][driver] Generate run-time type info

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Thu Jun 9 02:38:56 PDT 2022


Author: Andrzej Warzynski
Date: 2022-06-09T09:38:12Z
New Revision: ef4318e1a4ee7c9c1854d15b1343df73c2901f35

URL: https://github.com/llvm/llvm-project/commit/ef4318e1a4ee7c9c1854d15b1343df73c2901f35
DIFF: https://github.com/llvm/llvm-project/commit/ef4318e1a4ee7c9c1854d15b1343df73c2901f35.diff

LOG: [flang][driver] Generate run-time type info

This is a small follow-up for https://reviews.llvm.org/D120051. It makes
sure that tables with "run-time type information for derived types" are
generated for code-gen actions. Originally, only non-code-gen actions
were updated (i.e. actions that were fully supported at that time).

Differential Revision: https://reviews.llvm.org/D127307

Added: 
    

Modified: 
    flang/lib/Frontend/FrontendActions.cpp
    flang/test/Lower/derived-type-descriptor.f90

Removed: 
    


################################################################################
diff  --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index 296c75b587971..334849ceeb54c 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -90,7 +90,8 @@ bool CodeGenAction::beginSourceFileAction() {
   // Otherwise, generate an MLIR module from the input Fortran source
   assert(getCurrentInput().getKind().getLanguage() == Language::Fortran &&
          "Invalid input type - expecting a Fortran file");
-  bool res = runPrescan() && runParse() && runSemanticChecks();
+  bool res = runPrescan() && runParse() && runSemanticChecks() &&
+             generateRtTypeTables();
   if (!res)
     return res;
 

diff  --git a/flang/test/Lower/derived-type-descriptor.f90 b/flang/test/Lower/derived-type-descriptor.f90
index 116c4ee300971..35443d008a4c4 100644
--- a/flang/test/Lower/derived-type-descriptor.f90
+++ b/flang/test/Lower/derived-type-descriptor.f90
@@ -1,5 +1,6 @@
 ! Test lowering of derived type descriptors builtin data
 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
+! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
 
 subroutine foo()
   real, save, target :: init_values(10, 10)


        


More information about the flang-commits mailing list