aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mlir/examples/toy/Ch2/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch3/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch4/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch5/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch6/mlir/MLIRGen.cpp2
-rw-r--r--mlir/examples/toy/Ch7/mlir/MLIRGen.cpp6
6 files changed, 8 insertions, 8 deletions
diff --git a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
index bf4c099..96925be 100644
--- a/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
@@ -120,7 +120,7 @@ private:
// Arguments type are uniformly unranked tensors.
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
getType(VarType{}));
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, {});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
diff --git a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
index bf4c099..c8cba82 100644
--- a/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
@@ -120,7 +120,7 @@ private:
// Arguments type are uniformly unranked tensors.
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
getType(VarType{}));
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
diff --git a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
index b56e2f7c..9371815 100644
--- a/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
@@ -120,7 +120,7 @@ private:
// Arguments type are uniformly unranked tensors.
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
getType(VarType{}));
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
diff --git a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
index b56e2f7c..9371815 100644
--- a/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
@@ -120,7 +120,7 @@ private:
// Arguments type are uniformly unranked tensors.
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
getType(VarType{}));
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
diff --git a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
index b56e2f7c..9371815 100644
--- a/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
@@ -120,7 +120,7 @@ private:
// Arguments type are uniformly unranked tensors.
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
getType(VarType{}));
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
diff --git a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
index e554e37..2490f17 100644
--- a/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
+++ b/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
@@ -182,7 +182,7 @@ private:
return nullptr;
argTypes.push_back(type);
}
- auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+ auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
@@ -441,10 +441,10 @@ private:
for (auto &var : lit.getValues()) {
if (auto *number = llvm::dyn_cast<NumberExprAST>(var.get())) {
attrElements.push_back(getConstantAttr(*number));
- typeElements.push_back(getType(std::nullopt));
+ typeElements.push_back(getType(/*shape=*/{}));
} else if (auto *lit = llvm::dyn_cast<LiteralExprAST>(var.get())) {
attrElements.push_back(getConstantAttr(*lit));
- typeElements.push_back(getType(std::nullopt));
+ typeElements.push_back(getType(/*shape=*/{}));
} else {
auto *structLit = llvm::cast<StructLiteralExprAST>(var.get());
auto attrTypePair = getConstantAttr(*structLit);