[llvm] r281175 - ADT: Remove ilist_iterator::reset(), NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 11 13:47:27 PDT 2016
Author: dexonsmith
Date: Sun Sep 11 15:47:27 2016
New Revision: 281175
URL: http://llvm.org/viewvc/llvm-project?rev=281175&view=rev
Log:
ADT: Remove ilist_iterator::reset(), NFC
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.
Modified:
llvm/trunk/include/llvm/ADT/ilist_iterator.h
llvm/trunk/include/llvm/IR/IRBuilder.h
Modified: llvm/trunk/include/llvm/ADT/ilist_iterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_iterator.h?rev=281175&r1=281174&r2=281175&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist_iterator.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist_iterator.h Sun Sep 11 15:47:27 2016
@@ -121,8 +121,6 @@ public:
return ilist_iterator<OptionsT, IsReverse, false>();
}
- void reset(pointer NP) { NodePtr = NP; }
-
// Accessors...
reference operator*() const {
assert(!NodePtr->isKnownSentinel());
Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=281175&r1=281174&r2=281175&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Sun Sep 11 15:47:27 2016
@@ -114,7 +114,7 @@ public:
/// inserted into a block.
void ClearInsertionPoint() {
BB = nullptr;
- InsertPt.reset(nullptr);
+ InsertPt = BasicBlock::iterator();
}
BasicBlock *GetInsertBlock() const { return BB; }
More information about the llvm-commits
mailing list