aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Lower/CallInterface.cpp
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2022-10-05 23:04:59 +0200
committerValentin Clement <clementval@gmail.com>2022-10-05 23:05:28 +0200
commit91dd872ea6cff9bf6d83285b9c36dba40d86d0dd (patch)
tree89a72e6e4359608732b5793458e579f0aeb3667a /flang/lib/Lower/CallInterface.cpp
parent60b4b39f5a78661e2b9d222cf6ba7d9d5d7511ed (diff)
downloadllvm-91dd872ea6cff9bf6d83285b9c36dba40d86d0dd.zip
llvm-91dd872ea6cff9bf6d83285b9c36dba40d86d0dd.tar.gz
llvm-91dd872ea6cff9bf6d83285b9c36dba40d86d0dd.tar.bz2
[flang] Keep current polymorphic implementation under a flag
It is useful for couple of test suite like NAG to keep failing with a TODO until the polymorphic entities is implemented all the way done to codegen. This pass adds a flag to LoweringOptions for experimental development. This flag is off by default and can be enable in `bbc` with `-polymorphic-type`. Options can be added in the driver and tco when needed. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D135283
Diffstat (limited to 'flang/lib/Lower/CallInterface.cpp')
-rw-r--r--flang/lib/Lower/CallInterface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp
index 510cb60..d482859 100644
--- a/flang/lib/Lower/CallInterface.cpp
+++ b/flang/lib/Lower/CallInterface.cpp
@@ -797,6 +797,12 @@ private:
Fortran::common::TypeCategory cat = dynamicType.category();
// DERIVED
if (cat == Fortran::common::TypeCategory::Derived) {
+ // TODO is kept under experimental flag until feature is complete.
+ if (dynamicType.IsPolymorphic() &&
+ !getConverter().getLoweringOptions().isPolymorphicTypeImplEnabled())
+ TODO(interface.converter.getCurrentLocation(),
+ "support for polymorphic types");
+
if (dynamicType.IsUnlimitedPolymorphic())
return mlir::NoneType::get(&mlirContext);
return getConverter().genType(dynamicType.GetDerivedTypeSpec());