[flang][NFC] Add source line to lowering TODO messages
authorJean Perier <jperier@nvidia.com>
Tue, 23 Feb 2021 08:00:48 +0000 (09:00 +0100)
committerJean Perier <jperier@nvidia.com>
Tue, 23 Feb 2021 08:01:35 +0000 (09:01 +0100)
commit36ea1cac1a4226cc55866982104dc3de2cc194bf
treea722b4da2fac57cf00db2642c9f57e9ebe46ba3a
parentb6876ddc82323ba1527acfd5004be39d594652ff
[flang][NFC] Add source line to lowering TODO messages

- Add a fatal error handler that can print a message with source location
  before aborting.
- Update TODO macro to take an mlir location argument and to use the
  newly introduced fatal error handler.
- Introduce TODO_NOLOC for the few places where no source location is
  easily accessible.

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D97190
flang/include/flang/Lower/Todo.h
flang/include/flang/Optimizer/Support/FatalError.h [new file with mode: 0644]
flang/lib/Lower/OpenACC.cpp
flang/lib/Lower/OpenMP.cpp