From 836e34f727e17baa6507a5c6cc19d41dce8e769d Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Mon, 14 Mar 2022 11:49:50 +0100 Subject: [PATCH] [flang][NFC] Use TODO with location Use the TODO macro in `flang/Lower/Todo.h` with the converter location. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D121582 --- flang/lib/Lower/Coarray.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/flang/lib/Lower/Coarray.cpp b/flang/lib/Lower/Coarray.cpp index f59614b39503f..97a420ad78751 100644 --- a/flang/lib/Lower/Coarray.cpp +++ b/flang/lib/Lower/Coarray.cpp @@ -14,18 +14,11 @@ #include "flang/Lower/Coarray.h" #include "flang/Lower/AbstractConverter.h" #include "flang/Lower/SymbolMap.h" +#include "flang/Lower/Todo.h" #include "flang/Optimizer/Builder/FIRBuilder.h" #include "flang/Parser/parse-tree.h" #include "flang/Semantics/expression.h" -#undef TODO -#define TODO(MSG) \ - { \ - mlir::emitError(converter.getCurrentLocation(), "not yet implemented") \ - << MSG; \ - exit(1); \ - } - //===----------------------------------------------------------------------===// // TEAM statements and constructs //===----------------------------------------------------------------------===// @@ -34,27 +27,27 @@ void Fortran::lower::genChangeTeamConstruct( Fortran::lower::AbstractConverter &converter, Fortran::lower::pft::Evaluation &, const Fortran::parser::ChangeTeamConstruct &) { - TODO("CHANGE TEAM construct"); + TODO(converter.getCurrentLocation(), "CHANGE TEAM construct"); } void Fortran::lower::genChangeTeamStmt( Fortran::lower::AbstractConverter &converter, Fortran::lower::pft::Evaluation &, const Fortran::parser::ChangeTeamStmt &) { - TODO("CHANGE TEAM stmt"); + TODO(converter.getCurrentLocation(), "CHANGE TEAM stmt"); } void Fortran::lower::genEndChangeTeamStmt( Fortran::lower::AbstractConverter &converter, Fortran::lower::pft::Evaluation &, const Fortran::parser::EndChangeTeamStmt &) { - TODO("END CHANGE TEAM"); + TODO(converter.getCurrentLocation(), "END CHANGE TEAM"); } void Fortran::lower::genFormTeamStatement( Fortran::lower::AbstractConverter &converter, Fortran::lower::pft::Evaluation &, const Fortran::parser::FormTeamStmt &) { - TODO("FORM TEAM"); + TODO(converter.getCurrentLocation(), "FORM TEAM"); } //===----------------------------------------------------------------------===// @@ -64,10 +57,10 @@ void Fortran::lower::genFormTeamStatement( fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genAddr( const Fortran::evaluate::CoarrayRef &expr) { (void)symMap; - TODO("co-array address"); + TODO(converter.getCurrentLocation(), "co-array address"); } fir::ExtendedValue Fortran::lower::CoarrayExprHelper::genValue( const Fortran::evaluate::CoarrayRef &expr) { - TODO("co-array value"); + TODO(converter.getCurrentLocation(), "co-array value"); }