diff --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h --- a/flang/include/flang/Lower/Support/Utils.h +++ b/flang/include/flang/Lower/Support/Utils.h @@ -35,13 +35,6 @@ return {cb.begin(), cb.size()}; } -namespace fir { -/// Return the integer value of a arith::ConstantOp. -inline std::int64_t toInt(mlir::arith::ConstantOp cop) { - return cop.getValue().cast().getValue().getSExtValue(); -} -} // namespace fir - /// Template helper to remove Fortran::common::Indirection wrappers. template const A &removeIndirection(const A &a) { diff --git a/flang/lib/Lower/IntrinsicCall.cpp b/flang/lib/Lower/IntrinsicCall.cpp --- a/flang/lib/Lower/IntrinsicCall.cpp +++ b/flang/lib/Lower/IntrinsicCall.cpp @@ -16,7 +16,6 @@ #include "flang/Lower/IntrinsicCall.h" #include "flang/Common/static-multimap-view.h" #include "flang/Lower/Mangler.h" -#include "flang/Lower/Support/Utils.h" #include "flang/Optimizer/Builder/BoxValue.h" #include "flang/Optimizer/Builder/Character.h" #include "flang/Optimizer/Builder/Complex.h" @@ -36,6 +35,7 @@ #include "flang/Optimizer/Dialect/FIROpsSupport.h" #include "flang/Optimizer/Support/FatalError.h" #include "flang/Optimizer/Support/IntrinsicsRuntime.h" +#include "flang/Optimizer/Support/Utils.h" #include "flang/Runtime/entry-names.h" #include "mlir/Dialect/Complex/IR/Complex.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h"