Skip to content

Commit 35e4a28

Browse files
committed
Fix MLIR gcc7 build: ambiguous overload from user conversion
The implicit conversion from an op to a Value is not triggered for some reasons: /LoopLikeSCFOpsTest.cpp:78:57: error: call of overloaded ‘ValueRange(mlir::arith::ConstantIndexOp)’ is ambiguous b.create<scf::ParallelOp>(loc, ValueRange(lb.get()), ValueRange(ub.get()), explicitly taking the result of the op should solve it.
1 parent 47f0f8c commit 35e4a28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/unittests/Dialect/SCF/LoopLikeSCFOpsTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ TEST_F(SCFLoopLikeTest, queryUnidimensionalLooplikes) {
7474
std::nullopt);
7575
checkUnidimensional(forallOp.get());
7676

77-
OwningOpRef<scf::ParallelOp> parallelOp =
78-
b.create<scf::ParallelOp>(loc, ValueRange(lb.get()), ValueRange(ub.get()),
79-
ValueRange(step.get()), ValueRange());
77+
OwningOpRef<scf::ParallelOp> parallelOp = b.create<scf::ParallelOp>(
78+
loc, ValueRange(lb->getResult()), ValueRange(ub->getResult()),
79+
ValueRange(step->getResult()), ValueRange());
8080
checkUnidimensional(parallelOp.get());
8181
}
8282

0 commit comments

Comments
 (0)