Skip to content

Commit b373250

Browse files
authored
Avoid unused var error when assertion is turned off (Xilinx#916)
1 parent 42d516b commit b373250

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Conversion/ConvertToAIRPass.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,8 @@ ConvertForallToParallelInFilteredOps(SmallPtrSet<Operation *, 8> &filteredOps,
10791079
fAdded.push_back(newPar);
10801080
}
10811081
for (auto e : fErased)
1082-
assert(filteredOps.erase(e));
1082+
if (!filteredOps.erase(e))
1083+
return failure();
10831084
filteredOps.insert(fAdded.begin(), fAdded.end());
10841085
return success();
10851086
}
@@ -1465,8 +1466,6 @@ struct InsertEmptyLaunchOverHerdPass
14651466
}
14661467
};
14671468

1468-
1469-
14701469
// Identifies arith operations where all operands are either constants, or
14711470
// produced by IndexCastOp casting from IndexType. If detected, canonicalize
14721471
// IndexCast ops by changing the arith op's input/output types to IndexType.

0 commit comments

Comments
 (0)