Skip to content

Commit fd30e17

Browse files
Address a comment.
1 parent e123a86 commit fd30e17

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

mlir/examples/toy/Ch3/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class MLIRGenImpl {
120120
// Arguments type are uniformly unranked tensors.
121121
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
122122
getType(VarType{}));
123-
auto funcType = builder.getFunctionType(argTypes, {});
123+
auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
124124
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
125125
funcType);
126126
}

mlir/examples/toy/Ch4/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class MLIRGenImpl {
120120
// Arguments type are uniformly unranked tensors.
121121
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
122122
getType(VarType{}));
123-
auto funcType = builder.getFunctionType(argTypes, {});
123+
auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
124124
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
125125
funcType);
126126
}

mlir/examples/toy/Ch5/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class MLIRGenImpl {
120120
// Arguments type are uniformly unranked tensors.
121121
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
122122
getType(VarType{}));
123-
auto funcType = builder.getFunctionType(argTypes, {});
123+
auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
124124
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
125125
funcType);
126126
}

mlir/examples/toy/Ch6/mlir/MLIRGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class MLIRGenImpl {
120120
// Arguments type are uniformly unranked tensors.
121121
llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
122122
getType(VarType{}));
123-
auto funcType = builder.getFunctionType(argTypes, {});
123+
auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
124124
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
125125
funcType);
126126
}

mlir/examples/toy/Ch7/mlir/MLIRGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class MLIRGenImpl {
182182
return nullptr;
183183
argTypes.push_back(type);
184184
}
185-
auto funcType = builder.getFunctionType(argTypes, {});
185+
auto funcType = builder.getFunctionType(argTypes, /*results=*/{});
186186
return builder.create<mlir::toy::FuncOp>(location, proto.getName(),
187187
funcType);
188188
}
@@ -441,10 +441,10 @@ class MLIRGenImpl {
441441
for (auto &var : lit.getValues()) {
442442
if (auto *number = llvm::dyn_cast<NumberExprAST>(var.get())) {
443443
attrElements.push_back(getConstantAttr(*number));
444-
typeElements.push_back(getType({}));
444+
typeElements.push_back(getType(/*shape=*/{}));
445445
} else if (auto *lit = llvm::dyn_cast<LiteralExprAST>(var.get())) {
446446
attrElements.push_back(getConstantAttr(*lit));
447-
typeElements.push_back(getType({}));
447+
typeElements.push_back(getType(/*shape=*/{}));
448448
} else {
449449
auto *structLit = llvm::cast<StructLiteralExprAST>(var.get());
450450
auto attrTypePair = getConstantAttr(*structLit);

0 commit comments

Comments
 (0)