aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Lower/ConvertType.cpp
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2022-07-01 08:29:19 +0200
committerValentin Clement <clementval@gmail.com>2022-07-01 08:29:54 +0200
commit39377d52273edb53a371f32a862df82f6b7f239d (patch)
treec93d18091b4bfc864bd32886c85cb043042428a4 /flang/lib/Lower/ConvertType.cpp
parent39fe49aa57896831d63d10dee8b85ca665c97ad0 (diff)
downloadllvm-39377d52273edb53a371f32a862df82f6b7f239d.zip
llvm-39377d52273edb53a371f32a862df82f6b7f239d.tar.gz
llvm-39377d52273edb53a371f32a862df82f6b7f239d.tar.bz2
[flang] Fix APFloat conversion cases
This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D128935 Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Peter Steinfeld <psteinfeld@nvidia.com>
Diffstat (limited to 'flang/lib/Lower/ConvertType.cpp')
-rw-r--r--flang/lib/Lower/ConvertType.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp
index f32504d..783019d 100644
--- a/flang/lib/Lower/ConvertType.cpp
+++ b/flang/lib/Lower/ConvertType.cpp
@@ -160,8 +160,7 @@ struct TypeBuilder {
// Use unknown extents.
int rank = expr.Rank();
if (rank < 0)
- TODO(converter.getCurrentLocation(),
- "assumed rank expression type lowering");
+ TODO(converter.getCurrentLocation(), "assumed rank expression types");
for (int dim = 0; dim < rank; ++dim)
shape.emplace_back(fir::SequenceType::getUnknownExtent());
}
@@ -207,7 +206,7 @@ struct TypeBuilder {
using T = std::decay_t<decltype(x)>;
static_assert(!Fortran::common::HasMember<
T, Fortran::evaluate::TypelessExpression>,
- "missing typeless expr handling in type lowering");
+ "missing typeless expr handling");
llvm::report_fatal_error("not a typeless expression");
},
},
@@ -235,7 +234,7 @@ struct TypeBuilder {
translateLenParameters(params, tySpec->category(), ultimate);
ty = genFIRType(context, tySpec->category(), kind, params);
} else if (type->IsPolymorphic()) {
- TODO(loc, "[genSymbolType] polymorphic types");
+ TODO(loc, "support for polymorphic types");
} else if (const Fortran::semantics::DerivedTypeSpec *tySpec =
type->AsDerived()) {
ty = genDerivedType(*tySpec);
@@ -249,7 +248,7 @@ struct TypeBuilder {
auto shapeExpr = Fortran::evaluate::GetShapeHelper{
converter.getFoldingContext()}(ultimate);
if (!shapeExpr)
- TODO(loc, "assumed rank symbol type lowering");
+ TODO(loc, "assumed rank symbol type");
fir::SequenceType::Shape shape;
translateShape(shape, std::move(*shapeExpr));
ty = fir::SequenceType::get(shape, ty);
@@ -302,7 +301,7 @@ struct TypeBuilder {
// Catch any situations where this is not true for now.
if (componentHasNonDefaultLowerBounds(field))
TODO(converter.genLocation(field.name()),
- "lowering derived type components with non default lower bounds");
+ "derived type components with non default lower bounds");
if (IsProcedure(field))
TODO(converter.genLocation(field.name()), "procedure components");
mlir::Type ty = genSymbolType(field);
@@ -328,7 +327,7 @@ struct TypeBuilder {
if (!ps.empty()) {
// This type is a PDT (parametric derived type). Create the functions to
// use for allocation, dereferencing, and address arithmetic here.
- TODO(loc, "parameterized derived types lowering");
+ TODO(loc, "parameterized derived types");
}
LLVM_DEBUG(llvm::dbgs() << "derived type: " << rec << '\n');
@@ -364,8 +363,7 @@ struct TypeBuilder {
if (category == Fortran::common::TypeCategory::Character)
params.push_back(getCharacterLength(exprOrSym));
else if (category == Fortran::common::TypeCategory::Derived)
- TODO(converter.getCurrentLocation(),
- "lowering derived type length parameters");
+ TODO(converter.getCurrentLocation(), "derived type length parameters");
return;
}
Fortran::lower::LenParameterTy