[flang][openacc] Switch to use TODO from D88909
authorValentin Clement <clementval@gmail.com>
Mon, 19 Oct 2020 18:47:12 +0000 (14:47 -0400)
committerclementval <clementval@gmail.com>
Mon, 19 Oct 2020 18:47:37 +0000 (14:47 -0400)
Use the Todo.h header file introduce in D88909 to marke part of the lowering that are
not done yet.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D88915

flang/lib/Lower/OpenACC.cpp

index 25fb922..53ff3f3 100644 (file)
 #include "flang/Lower/FIRBuilder.h"
 #include "flang/Lower/PFTBuilder.h"
 #include "flang/Lower/Support/BoxValue.h"
+#include "flang/Lower/Todo.h"
 #include "flang/Parser/parse-tree.h"
 #include "flang/Semantics/tools.h"
 #include "mlir/Dialect/OpenACC/OpenACC.h"
 #include "llvm/Frontend/OpenACC/ACC.h.inc"
 
-#define TODO() llvm_unreachable("not yet implemented")
-
 static const Fortran::parser::Name *
 getDesignatorNameIfDataRef(const Fortran::parser::Designator &designator) {
   const auto *dataRef{std::get_if<Fortran::parser::DataRef>(&designator.u)};
@@ -528,22 +527,28 @@ void Fortran::lower::genOpenACCConstruct(
             genACC(converter, eval, blockConstruct);
           },
           [&](const Fortran::parser::OpenACCCombinedConstruct
-                  &combinedConstruct) { TODO(); },
+                  &combinedConstruct) {
+            TODO("OpenACC Combined construct not lowered yet!");
+          },
           [&](const Fortran::parser::OpenACCLoopConstruct &loopConstruct) {
             genACC(converter, eval, loopConstruct);
           },
           [&](const Fortran::parser::OpenACCStandaloneConstruct
-                  &standaloneConstruct) { TODO(); },
+                  &standaloneConstruct) {
+            TODO("OpenACC Standalone construct not lowered yet!");
+          },
           [&](const Fortran::parser::OpenACCRoutineConstruct
-                  &routineConstruct) { TODO(); },
+                  &routineConstruct) {
+            TODO("OpenACC Routine construct not lowered yet!");
+          },
           [&](const Fortran::parser::OpenACCCacheConstruct &cacheConstruct) {
-            TODO();
+            TODO("OpenACC Cache construct not lowered yet!");
           },
           [&](const Fortran::parser::OpenACCWaitConstruct &waitConstruct) {
-            TODO();
+            TODO("OpenACC Wait construct not lowered yet!");
           },
           [&](const Fortran::parser::OpenACCAtomicConstruct &atomicConstruct) {
-            TODO();
+            TODO("OpenACC Atomic construct not lowered yet!");
           },
       },
       accConstruct.u);