[flang-commits] [flang] cdd5f34 - [flang][NFC] remove duplicate fir::toInt definition 4/6
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Feb 6 02:35:25 PST 2023
Author: Tom Eccles
Date: 2023-02-06T10:33:20Z
New Revision: cdd5f349695c66c2206427c6d88ca09c46ed64a1
URL: https://github.com/llvm/llvm-project/commit/cdd5f349695c66c2206427c6d88ca09c46ed64a1
DIFF: https://github.com/llvm/llvm-project/commit/cdd5f349695c66c2206427c6d88ca09c46ed64a1.diff
LOG: [flang][NFC] remove duplicate fir::toInt definition 4/6
Differential Revision: https://reviews.llvm.org/D143082
Added:
Modified:
flang/include/flang/Lower/Support/Utils.h
flang/lib/Lower/IntrinsicCall.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h
index 38b9bf369a879..c84dd93c7d0cb 100644
--- a/flang/include/flang/Lower/Support/Utils.h
+++ b/flang/include/flang/Lower/Support/Utils.h
@@ -35,13 +35,6 @@ inline llvm::StringRef toStringRef(const Fortran::parser::CharBlock &cb) {
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<mlir::IntegerAttr>().getValue().getSExtValue();
-}
-} // namespace fir
-
/// Template helper to remove Fortran::common::Indirection wrappers.
template <typename A>
const A &removeIndirection(const A &a) {
diff --git a/flang/lib/Lower/IntrinsicCall.cpp b/flang/lib/Lower/IntrinsicCall.cpp
index 790d6109a450d..14c47dc8d03b9 100644
--- 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/Builder/Todo.h"
#include "flang/Optimizer/Dialect/FIROpsSupport.h"
#include "flang/Optimizer/Support/FatalError.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"
More information about the flang-commits
mailing list