summaryrefslogtreecommitdiff
path: root/flang/lib/Lower/ConvertConstant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Lower/ConvertConstant.cpp')
-rw-r--r--flang/lib/Lower/ConvertConstant.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/flang/lib/Lower/ConvertConstant.cpp b/flang/lib/Lower/ConvertConstant.cpp
index 38f83f1deceb..1051d50ce8a9 100644
--- a/flang/lib/Lower/ConvertConstant.cpp
+++ b/flang/lib/Lower/ConvertConstant.cpp
@@ -150,8 +150,8 @@ private:
auto attrTc = TC == Fortran::common::TypeCategory::Logical
? Fortran::common::TypeCategory::Integer
: TC;
- attributeElementType = Fortran::lower::getFIRType(
- builder.getContext(), attrTc, KIND, std::nullopt);
+ attributeElementType =
+ Fortran::lower::getFIRType(builder.getContext(), attrTc, KIND, {});
for (auto element : constant.values())
attributes.push_back(
convertToAttribute<TC, KIND>(builder, element, attributeElementType));
@@ -230,8 +230,7 @@ static mlir::Value genScalarLit(
TC == Fortran::common::TypeCategory::Unsigned) {
// MLIR requires constants to be signless
mlir::Type ty = Fortran::lower::getFIRType(
- builder.getContext(), Fortran::common::TypeCategory::Integer, KIND,
- std::nullopt);
+ builder.getContext(), Fortran::common::TypeCategory::Integer, KIND, {});
if (KIND == 16) {
auto bigInt = llvm::APInt(ty.getIntOrFloatBitWidth(),
TC == Fortran::common::TypeCategory::Unsigned