Skip to content

Commit

Permalink
ADT: Remove ilist_iterator::reset(), NFC
Browse files Browse the repository at this point in the history
ilist_iterator::reset was unnecessary API, and wasn't any clearer (or
safer) at the call site than constructing a temporary and assigning it
to the iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281175 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Sep 11, 2016
1 parent 1735568 commit bc1fa10
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions include/llvm/ADT/ilist_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ class ilist_iterator : ilist_detail::SpecificNodeAccess<OptionsT> {
return ilist_iterator<OptionsT, IsReverse, false>();
}

void reset(pointer NP) { NodePtr = NP; }

// Accessors...
reference operator*() const {
assert(!NodePtr->isKnownSentinel());
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class IRBuilderBase {
/// inserted into a block.
void ClearInsertionPoint() {
BB = nullptr;
InsertPt.reset(nullptr);
InsertPt = BasicBlock::iterator();
}

BasicBlock *GetInsertBlock() const { return BB; }
Expand Down

0 comments on commit bc1fa10

Please sign in to comment.