Skip to content

Commit

Permalink
[flang][NFC] Use TODO with location
Browse files Browse the repository at this point in the history
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
  • Loading branch information
clementval committed Mar 14, 2022
1 parent 9260592 commit 836e34f
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions flang/lib/Lower/Coarray.cpp
Expand Up @@ -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
//===----------------------------------------------------------------------===//
Expand All @@ -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");
}

//===----------------------------------------------------------------------===//
Expand All @@ -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");
}

0 comments on commit 836e34f

Please sign in to comment.