Skip to content

Commit 108e1c1

Browse files
Remove bits that have nothing to do with perfect forwarding
1 parent 34881c8 commit 108e1c1

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

mlir/unittests/IR/OperationSupportTest.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ TEST(OperandStorageTest, NonResizable) {
3232
MLIRContext context;
3333
Builder builder(&context);
3434

35-
Operation *useOp = createOp(&context, /*operands=*/ArrayRef<Value>(),
36-
builder.getIntegerType(16));
35+
Operation *useOp =
36+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
3737
Value operand = useOp->getResult(0);
3838

3939
// Create a non-resizable operation with one operand.
@@ -56,8 +56,8 @@ TEST(OperandStorageTest, Resizable) {
5656
MLIRContext context;
5757
Builder builder(&context);
5858

59-
Operation *useOp = createOp(&context, /*operands=*/ArrayRef<Value>(),
60-
builder.getIntegerType(16));
59+
Operation *useOp =
60+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
6161
Value operand = useOp->getResult(0);
6262

6363
// Create a resizable operation with one operand.
@@ -84,8 +84,8 @@ TEST(OperandStorageTest, RangeReplace) {
8484
MLIRContext context;
8585
Builder builder(&context);
8686

87-
Operation *useOp = createOp(&context, /*operands=*/ArrayRef<Value>(),
88-
builder.getIntegerType(16));
87+
Operation *useOp =
88+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
8989
Value operand = useOp->getResult(0);
9090

9191
// Create a resizable operation with one operand.
@@ -120,8 +120,8 @@ TEST(OperandStorageTest, MutableRange) {
120120
MLIRContext context;
121121
Builder builder(&context);
122122

123-
Operation *useOp = createOp(&context, /*operands=*/ArrayRef<Value>(),
124-
builder.getIntegerType(16));
123+
Operation *useOp =
124+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
125125
Value operand = useOp->getResult(0);
126126

127127
// Create a resizable operation with one operand.
@@ -159,7 +159,7 @@ TEST(OperandStorageTest, RangeErase) {
159159

160160
Type type = builder.getNoneType();
161161
Operation *useOp =
162-
createOp(&context, /*operands=*/ArrayRef<Value>(), {type, type});
162+
createOp(&context, /*operands=*/std::nullopt, {type, type});
163163
Value operand1 = useOp->getResult(0);
164164
Value operand2 = useOp->getResult(1);
165165

@@ -189,8 +189,8 @@ TEST(OperationOrderTest, OrderIsAlwaysValid) {
189189
MLIRContext context;
190190
Builder builder(&context);
191191

192-
Operation *containerOp = createOp(&context, /*operands=*/ArrayRef<Value>(),
193-
/*resultTypes=*/ArrayRef<Type>(),
192+
Operation *containerOp = createOp(&context, /*operands=*/std::nullopt,
193+
/*resultTypes=*/std::nullopt,
194194
/*numRegions=*/1);
195195
Region &region = containerOp->getRegion(0);
196196
Block *block = new Block();

mlir/unittests/IR/ValueTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ TEST(ValueTest, getNumUses) {
3131
MLIRContext context;
3232
Builder builder(&context);
3333

34-
Operation *op0 = createOp(&context, /*operands=*/ArrayRef<Value>(),
35-
builder.getIntegerType(16));
34+
Operation *op0 =
35+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
3636

3737
Value v0 = op0->getResult(0);
3838
EXPECT_EQ(v0.getNumUses(), (unsigned)0);
@@ -52,8 +52,8 @@ TEST(ValueTest, hasNUses) {
5252
MLIRContext context;
5353
Builder builder(&context);
5454

55-
Operation *op0 = createOp(&context, /*operands=*/ArrayRef<Value>(),
56-
builder.getIntegerType(16));
55+
Operation *op0 =
56+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
5757
Value v0 = op0->getResult(0);
5858
EXPECT_TRUE(v0.hasNUses(0));
5959
EXPECT_FALSE(v0.hasNUses(1));
@@ -76,8 +76,8 @@ TEST(ValueTest, hasNUsesOrMore) {
7676
MLIRContext context;
7777
Builder builder(&context);
7878

79-
Operation *op0 = createOp(&context, /*operands=*/ArrayRef<Value>(),
80-
builder.getIntegerType(16));
79+
Operation *op0 =
80+
createOp(&context, /*operands=*/std::nullopt, builder.getIntegerType(16));
8181
Value v0 = op0->getResult(0);
8282
EXPECT_TRUE(v0.hasNUsesOrMore(0));
8383
EXPECT_FALSE(v0.hasNUsesOrMore(1));

0 commit comments

Comments
 (0)