Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mlir/examples/toy/Ch2/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MLIRGenImpl {
// 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);
}
Expand Down
2 changes: 1 addition & 1 deletion mlir/examples/toy/Ch3/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MLIRGenImpl {
// 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);
}
Expand Down
2 changes: 1 addition & 1 deletion mlir/examples/toy/Ch4/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MLIRGenImpl {
// 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);
}
Expand Down
2 changes: 1 addition & 1 deletion mlir/examples/toy/Ch5/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MLIRGenImpl {
// 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);
}
Expand Down
2 changes: 1 addition & 1 deletion mlir/examples/toy/Ch6/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MLIRGenImpl {
// 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);
}
Expand Down
6 changes: 3 additions & 3 deletions mlir/examples/toy/Ch7/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class MLIRGenImpl {
return nullptr;
argTypes.push_back(type);
}
auto funcType = builder.getFunctionType(argTypes, std::nullopt);
auto funcType = builder.getFunctionType(argTypes, {});
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
funcType);
}
Expand Down Expand Up @@ -441,10 +441,10 @@ class MLIRGenImpl {
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({}));
} 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({}));
} else {
auto *structLit = llvm::cast<StructLiteralExprAST>(var.get());
auto attrTypePair = getConstantAttr(*structLit);
Expand Down
Loading