diff --git a/flang/include/flang/Optimizer/Builder/Todo.h b/flang/include/flang/Optimizer/Builder/Todo.h --- a/flang/include/flang/Optimizer/Builder/Todo.h +++ b/flang/include/flang/Optimizer/Builder/Todo.h @@ -34,16 +34,16 @@ // In a release build, just give a message and exit. #define TODO_NOLOC(ToDoMsg) \ do { \ - llvm::errs() << __FILE__ << ':' << __LINE__ << ": not yet implemented " \ - << ToDoMsg << '\n'; \ + llvm::errs() << __FILE__ << ':' << __LINE__ \ + << ": not yet implemented: " << ToDoMsg << '\n'; \ std::exit(1); \ } while (false) #undef TODO_DEFN #define TODO_DEFN(MlirLoc, ToDoMsg, ToDoFile, ToDoLine) \ do { \ - mlir::emitError(MlirLoc, ToDoFile \ - ":" TODOQUOTE(ToDoLine) ": not yet implemented " ToDoMsg); \ + mlir::emitError(MlirLoc, ToDoFile ":" TODOQUOTE( \ + ToDoLine) ": not yet implemented: " ToDoMsg); \ std::exit(1); \ } while (false) @@ -56,7 +56,7 @@ #define TODO_NOLOCDEFN(ToDoMsg, ToDoFile, ToDoLine) \ do { \ llvm::report_fatal_error( \ - __FILE__ ":" TODOQUOTE(__LINE__) ": not yet implemented " ToDoMsg); \ + ToDoFile ":" TODOQUOTE(ToDoLine) ": not yet implemented: " ToDoMsg); \ } while (false) #define TODO_NOLOC(ToDoMsg) TODO_NOLOCDEFN(ToDoMsg, __FILE__, __LINE__) @@ -66,7 +66,7 @@ do { \ fir::emitFatalError( \ MlirLoc, \ - ToDoFile ":" TODOQUOTE(ToDoLine) ": not yet implemented " ToDoMsg); \ + ToDoFile ":" TODOQUOTE(ToDoLine) ": not yet implemented: " ToDoMsg); \ } while (false) #define TODO(MlirLoc, ToDoMsg) TODO_DEFN(MlirLoc, ToDoMsg, __FILE__, __LINE__) diff --git a/flang/lib/Lower/Allocatable.cpp b/flang/lib/Lower/Allocatable.cpp --- a/flang/lib/Lower/Allocatable.cpp +++ b/flang/lib/Lower/Allocatable.cpp @@ -430,7 +430,7 @@ if (const Fortran::semantics::DerivedTypeSpec *derived = typeSpec->AsDerived()) if (Fortran::semantics::CountLenParameters(*derived) > 0) - TODO(loc, "TODO: setting derived type params in allocation"); + TODO(loc, "setting derived type params in allocation"); if (typeSpec->category() == Fortran::semantics::DeclTypeSpec::Category::Character) { Fortran::semantics::ParamValue lenParam = @@ -468,7 +468,7 @@ TODO(loc, "MOLD allocation lowering"); } void genSetType(const Allocation &, const fir::MutableBoxValue &) { - TODO(loc, "Polymorphic entity allocation lowering"); + TODO(loc, "polymorphic entity allocation lowering"); } /// Returns a pointer to the DeclTypeSpec if a type-spec is provided in the diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -2840,7 +2840,7 @@ const Fortran::semantics::Symbol &procSymbol = funit.getSubprogramSymbol(); if (procSymbol.owner().IsSubmodule()) { - TODO(toLocation(), "support submodules"); + TODO(toLocation(), "support for submodules"); return; } } diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp --- a/flang/lib/Lower/CallInterface.cpp +++ b/flang/lib/Lower/CallInterface.cpp @@ -807,13 +807,13 @@ if (obj.attrs.test(Attrs::Optional)) addMLIRAttr(fir::getOptionalAttrName()); if (obj.attrs.test(Attrs::Asynchronous)) - TODO(loc, "Asynchronous in procedure interface"); + TODO(loc, "ASYNCHRONOUS in procedure interface"); if (obj.attrs.test(Attrs::Contiguous)) addMLIRAttr(fir::getContiguousAttrName()); if (obj.attrs.test(Attrs::Value)) isValueAttr = true; // TODO: do we want an mlir::Attribute as well? if (obj.attrs.test(Attrs::Volatile)) - TODO(loc, "Volatile in procedure interface"); + TODO(loc, "VOLATILE in procedure interface"); if (obj.attrs.test(Attrs::Target)) addMLIRAttr(fir::getTargetAttrName()); @@ -823,9 +823,9 @@ const Fortran::evaluate::characteristics::TypeAndShape::Attrs &shapeAttrs = obj.type.attrs(); if (shapeAttrs.test(ShapeAttr::AssumedRank)) - TODO(loc, "Assumed Rank in procedure interface"); + TODO(loc, "assumed rank in procedure interface"); if (shapeAttrs.test(ShapeAttr::Coarray)) - TODO(loc, "Coarray in procedure interface"); + TODO(loc, "coarray in procedure interface"); // So far assume that if the argument cannot be passed by implicit interface // it must be by box. That may no be always true (e.g for simple optionals) diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp --- a/flang/lib/Lower/ConvertExpr.cpp +++ b/flang/lib/Lower/ConvertExpr.cpp @@ -1060,7 +1060,7 @@ TODO(loc, "rank inquiry on assumed rank"); case Fortran::evaluate::DescriptorInquiry::Field::Stride: // So far the front end does not generate this inquiry. - TODO(loc, "Stride inquiry"); + TODO(loc, "stride inquiry"); } llvm_unreachable("unknown descriptor inquiry"); } @@ -2319,7 +2319,7 @@ if (charType.hasDynamicLen() && allocMemTypeParams.empty()) allocMemTypeParams.push_back(charLen); } else if (fir::hasDynamicSize(elementType)) { - TODO(loc, "Creating temporary for derived type with length parameters"); + TODO(loc, "creating temporary for derived type with length parameters"); } mlir::Value temp = builder.create( diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp --- a/flang/lib/Lower/ConvertType.cpp +++ b/flang/lib/Lower/ConvertType.cpp @@ -161,7 +161,7 @@ int rank = expr.Rank(); if (rank < 0) TODO(converter.getCurrentLocation(), - "Assumed rank expression type lowering"); + "assumed rank expression type lowering"); for (int dim = 0; dim < rank; ++dim) shape.emplace_back(fir::SequenceType::getUnknownExtent()); } @@ -328,7 +328,7 @@ 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, "parametrized derived types lowering"); + TODO(loc, "parameterized derived types lowering"); } LLVM_DEBUG(llvm::dbgs() << "derived type: " << rec << '\n'); diff --git a/flang/lib/Lower/VectorSubscripts.cpp b/flang/lib/Lower/VectorSubscripts.cpp --- a/flang/lib/Lower/VectorSubscripts.cpp +++ b/flang/lib/Lower/VectorSubscripts.cpp @@ -111,7 +111,7 @@ // Parent components will not be found here, they are not part // of the FIR type and cannot be used in the path yet. if (componentSymbol.test(Fortran::semantics::Symbol::Flag::ParentComp)) - TODO(loc, "Reference to parent component"); + TODO(loc, "reference to parent component"); mlir::Type fldTy = fir::FieldType::get(&converter.getMLIRContext()); llvm::StringRef componentName = toStringRef(componentSymbol.name()); // Parameters threading in field_index is not yet very clear. We only @@ -212,7 +212,7 @@ mlir::Type gen(const Fortran::evaluate::CoarrayRef &) { // Is this possible/legal ? - TODO(loc, "Coarray ref with vector subscript in IO input"); + TODO(loc, "coarray ref with vector subscript in IO input"); } template diff --git a/flang/lib/Optimizer/Builder/MutableBox.cpp b/flang/lib/Optimizer/Builder/MutableBox.cpp --- a/flang/lib/Optimizer/Builder/MutableBox.cpp +++ b/flang/lib/Optimizer/Builder/MutableBox.cpp @@ -396,7 +396,7 @@ const fir::MutableBoxValue &box, bool mayBePolymorphic) { if (box.hasAssumedRank()) - TODO(loc, "Assumed rank allocatables or pointers"); + TODO(loc, "assumed rank allocatables or pointers"); llvm::SmallVector lbounds; llvm::SmallVector extents; llvm::SmallVector lengths; @@ -526,7 +526,7 @@ "Cannot write MutableBox to another MutableBox"); }, [&](const fir::ProcBoxValue &) { - TODO(loc, "Procedure pointer assignment"); + TODO(loc, "procedure pointer assignment"); }); } @@ -623,7 +623,7 @@ "Cannot write MutableBox to another MutableBox"); }, [&](const fir::ProcBoxValue &) { - TODO(loc, "Procedure pointer assignment"); + TODO(loc, "procedure pointer assignment"); }); } diff --git a/flang/test/Fir/Todo/allocmem.fir b/flang/test/Fir/Todo/allocmem.fir --- a/flang/test/Fir/Todo/allocmem.fir +++ b/flang/test/Fir/Todo/allocmem.fir @@ -4,7 +4,7 @@ // Not implemented yet. func.func @allocmem_test(%arg0 : i32, %arg1 : i16) { -// CHECK: not yet implemented fir.allocmem codegen of derived type with length parameters +// CHECK: not yet implemented: fir.allocmem codegen of derived type with length parameters %0 = fir.allocmem !fir.type<_QTt(p1:i32,p2:i16){f1:i32,f2:f32}>(%arg0, %arg1 : i32, i16) {name = "_QEvar"} return } diff --git a/flang/test/Fir/Todo/coordinate_of_1.fir b/flang/test/Fir/Todo/coordinate_of_1.fir --- a/flang/test/Fir/Todo/coordinate_of_1.fir +++ b/flang/test/Fir/Todo/coordinate_of_1.fir @@ -5,7 +5,7 @@ // currently being generated (this error is generated before trying to convert // `fir.coordinate_of`) func.func @coordinate_box_derived_with_fir_len(%arg0: !fir.box>) { -// CHECK: not yet implemented fir.len_param_index codegen +// CHECK: not yet implemented: fir.len_param_index codegen %e = fir.len_param_index len1, !fir.type %q = fir.coordinate_of %arg0, %e : (!fir.box>, !fir.len) -> !fir.ref return diff --git a/flang/test/Fir/Todo/coordinate_of_2.fir b/flang/test/Fir/Todo/coordinate_of_2.fir --- a/flang/test/Fir/Todo/coordinate_of_2.fir +++ b/flang/test/Fir/Todo/coordinate_of_2.fir @@ -1,6 +1,6 @@ // RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s -// CHECK: not yet implemented fir.array nested inside other array and/or derived type +// CHECK: not yet implemented: fir.array nested inside other array and/or derived type // `!fir.coordinate_of` - `!fir.array` inside "boxed" `!fir.type` func.func @coordinate_box_array_inside_derived(%arg0: !fir.box, field_2:i32}>>, %arg1 : index) { diff --git a/flang/test/Fir/Todo/coordinate_of_3.fir b/flang/test/Fir/Todo/coordinate_of_3.fir --- a/flang/test/Fir/Todo/coordinate_of_3.fir +++ b/flang/test/Fir/Todo/coordinate_of_3.fir @@ -1,6 +1,6 @@ // RUN: %not_todo_cmd fir-opt --fir-to-llvm-ir="target=x86_64-unknown-linux-gnu" %s 2>&1 | FileCheck %s -// CHECK: not yet implemented fir.array nested inside other array and/or derived type +// CHECK: not yet implemented: fir.array nested inside other array and/or derived type // `fir.coordinate_of` - `fir.array` inside "boxed" `!fir.type}` (i.e. nested `!fir.type`) func.func @coordinate_box_array_inside_derived(%arg0: !fir.box}>}>>, %arg1 : index) { diff --git a/flang/test/Fir/Todo/coordinate_of_4.fir b/flang/test/Fir/Todo/coordinate_of_4.fir --- a/flang/test/Fir/Todo/coordinate_of_4.fir +++ b/flang/test/Fir/Todo/coordinate_of_4.fir @@ -4,7 +4,7 @@ // `!fir.len_param_index` is not implemented yet, the error that we hit is // related to `!fir.len_param_index` rather than `!fir.coordinate_of`. func.func @coordinate_box_derived_with_fir_len(%arg0: !fir.box>) { -// CHECK: not yet implemented fir.len_param_index codegen +// CHECK: not yet implemented: fir.len_param_index codegen %e = fir.len_param_index len1, !fir.type %q = fir.coordinate_of %arg0, %e : (!fir.box>, !fir.len) -> !fir.ref return diff --git a/flang/test/Fir/Todo/dispatch.fir b/flang/test/Fir/Todo/dispatch.fir --- a/flang/test/Fir/Todo/dispatch.fir +++ b/flang/test/Fir/Todo/dispatch.fir @@ -4,7 +4,7 @@ // Not implemented yet. func.func @dispatch(%arg0: !fir.box>) { -// CHECK: not yet implemented fir.dispatch codegen +// CHECK: not yet implemented: fir.dispatch codegen %0 = fir.dispatch "method"(%arg0) : (!fir.box>) -> i32 return } diff --git a/flang/test/Fir/Todo/dispatch_table.fir b/flang/test/Fir/Todo/dispatch_table.fir --- a/flang/test/Fir/Todo/dispatch_table.fir +++ b/flang/test/Fir/Todo/dispatch_table.fir @@ -3,7 +3,7 @@ // Test fir.dispatch_table conversion to llvm. // Not implemented yet. -// CHECK: not yet implemented fir.dispatch_table codegen +// CHECK: not yet implemented: fir.dispatch_table codegen fir.dispatch_table @dispatch_tbl { fir.dt_entry "method", @method_impl } diff --git a/flang/test/Fir/Todo/end.fir b/flang/test/Fir/Todo/end.fir --- a/flang/test/Fir/Todo/end.fir +++ b/flang/test/Fir/Todo/end.fir @@ -4,6 +4,6 @@ // Not implemented yet. func.func @end_test() { -// CHECK: not yet implemented fir.end codegen +// CHECK: not yet implemented: fir.end codegen "fir.end"() : () -> () } diff --git a/flang/test/Fir/Todo/gentypedesc.fir b/flang/test/Fir/Todo/gentypedesc.fir --- a/flang/test/Fir/Todo/gentypedesc.fir +++ b/flang/test/Fir/Todo/gentypedesc.fir @@ -4,7 +4,7 @@ // Not implemented yet. func.func @gentypedesc() { -// CHECK: not yet implemented fir.gentypedesc codegen +// CHECK: not yet implemented: fir.gentypedesc codegen %0 = fir.gentypedesc !fir.type return } diff --git a/flang/test/Fir/Todo/global_len.fir b/flang/test/Fir/Todo/global_len.fir --- a/flang/test/Fir/Todo/global_len.fir +++ b/flang/test/Fir/Todo/global_len.fir @@ -4,7 +4,7 @@ // Not implemented yet. fir.global @global_derived : !fir.type { -// CHECK: not yet implemented fir.global_len codegen +// CHECK: not yet implemented: fir.global_len codegen fir.global_len f, 1 : i32 %0 = fir.undefined !fir.type fir.has_value %0 : !fir.type diff --git a/flang/test/Fir/Todo/len_param_index.fir b/flang/test/Fir/Todo/len_param_index.fir --- a/flang/test/Fir/Todo/len_param_index.fir +++ b/flang/test/Fir/Todo/len_param_index.fir @@ -4,7 +4,7 @@ // Not implemented yet. func.func @lenparamindex() { - // CHECK: not yet implemented fir.len_param_index codegen + // CHECK: not yet implemented: fir.len_param_index codegen %0 = fir.len_param_index l1, !fir.type return } diff --git a/flang/test/Fir/Todo/select_case_with_character.fir b/flang/test/Fir/Todo/select_case_with_character.fir --- a/flang/test/Fir/Todo/select_case_with_character.fir +++ b/flang/test/Fir/Todo/select_case_with_character.fir @@ -4,7 +4,7 @@ // Not implemented yet. func.func @select_case_charachter(%arg0: !fir.char<2, 10>, %arg1: !fir.char<2, 10>, %arg2: !fir.char<2, 10>) { -// CHECK: not yet implemented fir.select_case codegen with character type +// CHECK: not yet implemented: fir.select_case codegen with character type fir.select_case %arg0 : !fir.char<2, 10> [#fir.point, %arg1, ^bb1, #fir.point, %arg2, ^bb2, unit, ^bb3] diff --git a/flang/test/Lower/derived-types.f90 b/flang/test/Lower/derived-types.f90 --- a/flang/test/Lower/derived-types.f90 +++ b/flang/test/Lower/derived-types.f90 @@ -1,7 +1,7 @@ ! Test basic parts of derived type entities lowering ! RUN: bbc -emit-fir %s -o - | FileCheck %s -! Note: only testing non parametrized derived type here. +! Note: only testing non parameterized derived type here. module d type r