Skip to content

Commit 028b690

Browse files
committed
[TableGen] Remove unnecessary check before calling SmallVector::erase. NFC
This was checking whether the erase is needed, but erase is safe to call with equal iterators.
1 parent 32d7211 commit 028b690

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/utils/TableGen/DAGISelMatcherOpt.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ static void FactorNodes(std::unique_ptr<Matcher> &InputMatcherPtr) {
361361
}
362362

363363
// Trim the array to match the updated end.
364-
if (E != OptionsToMatch.end())
365-
OptionsToMatch.erase(E, OptionsToMatch.end());
364+
OptionsToMatch.erase(E, OptionsToMatch.end());
366365

367366
// If we're down to a single pattern to match, then we don't need this scope
368367
// anymore.

0 commit comments

Comments
 (0)