[flang-commits] [flang] e530073 - [flang] Add proper todo in BoxValue

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Wed Jun 8 08:51:21 PDT 2022


Author: Valentin Clement
Date: 2022-06-08T17:51:15+02:00
New Revision: e530073c3e31b1e2a454ae488a97e5a4657127bf

URL: https://github.com/llvm/llvm-project/commit/e530073c3e31b1e2a454ae488a97e5a4657127bf
DIFF: https://github.com/llvm/llvm-project/commit/e530073c3e31b1e2a454ae488a97e5a4657127bf.diff

LOG: [flang] Add proper todo in BoxValue

Switch debub message to proper TODOs.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: jeanPerier

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

Added: 
    

Modified: 
    flang/lib/Optimizer/Builder/BoxValue.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Builder/BoxValue.cpp b/flang/lib/Optimizer/Builder/BoxValue.cpp
index 52c7fea058c11..f7e3f86834ee6 100644
--- a/flang/lib/Optimizer/Builder/BoxValue.cpp
+++ b/flang/lib/Optimizer/Builder/BoxValue.cpp
@@ -11,6 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "flang/Optimizer/Builder/BoxValue.h"
+#include "flang/Lower/Todo.h"
 #include "flang/Optimizer/Builder/FIRBuilder.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "llvm/Support/Debug.h"
@@ -42,7 +43,8 @@ fir::ExtendedValue fir::substBase(const fir::ExtendedValue &exv,
       [=](const auto &x) { return fir::ExtendedValue(x.clone(base)); });
 }
 
-llvm::SmallVector<mlir::Value> fir::getTypeParams(const ExtendedValue &exv) {
+llvm::SmallVector<mlir::Value>
+fir::getTypeParams(const fir::ExtendedValue &exv) {
   using RT = llvm::SmallVector<mlir::Value>;
   auto baseTy = fir::getBase(exv).getType();
   if (auto t = fir::dyn_cast_ptrEleTy(baseTy))
@@ -55,15 +57,13 @@ llvm::SmallVector<mlir::Value> fir::getTypeParams(const ExtendedValue &exv) {
       [](const fir::CharBoxValue &x) -> RT { return {x.getLen()}; },
       [](const fir::CharArrayBoxValue &x) -> RT { return {x.getLen()}; },
       [&](const fir::BoxValue &) -> RT {
-        LLVM_DEBUG(mlir::emitWarning(
-            loc, "TODO: box value is missing type parameters"));
+        TODO(loc, "box value is missing type parameters");
         return {};
       },
       [&](const fir::MutableBoxValue &) -> RT {
         // In this case, the type params may be bound to the variable in an
         // ALLOCATE statement as part of a type-spec.
-        LLVM_DEBUG(mlir::emitWarning(
-            loc, "TODO: mutable box value is missing type parameters"));
+        TODO(loc, "mutable box value is missing type parameters");
         return {};
       },
       [](const auto &) -> RT { return {}; });


        


More information about the flang-commits mailing list