[flang-commits] [flang] [flang][NFC] Unify getIfConstantIntValue helpers (PR #87633)

via flang-commits flang-commits at lists.llvm.org
Fri Apr 5 00:03:47 PDT 2024


================
@@ -695,6 +695,10 @@ mlir::Value createNullBoxProc(fir::FirOpBuilder &builder, mlir::Location loc,
 
 /// Set internal linkage attribute on a function.
 void setInternalLinkage(mlir::func::FuncOp);
+
+/// Extract constant from a value if it is a result of one of the ConstantOp
+/// operations, otherwise, return std::nullopt.
+std::optional<int64_t> getIfConstantIntValue(mlir::Value val);
----------------
jeanPerier wrote:

Shouldn't this declaration be removed?

https://github.com/llvm/llvm-project/pull/87633


More information about the flang-commits mailing list