CodeGen: Remove implicit ilist iterator conversions, NFC
Make ilist iterator conversions explicit in clangCodeGen. Eventually
I'll remove them everywhere.
llvm-svn: 252358
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 4c3202c..3d8c41c 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -175,14 +175,16 @@
// Find the first store of "this", which will be to the alloca associated
// with "this".
Address ThisPtr(&*AI, CGM.getClassPointerAlignment(MD->getParent()));
- llvm::BasicBlock *EntryBB = Fn->begin();
- llvm::Instruction *ThisStore =
+ llvm::BasicBlock *EntryBB = &Fn->front();
+ llvm::BasicBlock::iterator ThisStore =
std::find_if(EntryBB->begin(), EntryBB->end(), [&](llvm::Instruction &I) {
- return isa<llvm::StoreInst>(I) && I.getOperand(0) == ThisPtr.getPointer();
- });
- assert(ThisStore && "Store of this should be in entry block?");
+ return isa<llvm::StoreInst>(I) &&
+ I.getOperand(0) == ThisPtr.getPointer();
+ });
+ assert(ThisStore != EntryBB->end() &&
+ "Store of this should be in entry block?");
// Adjust "this", if necessary.
- Builder.SetInsertPoint(ThisStore);
+ Builder.SetInsertPoint(&*ThisStore);
llvm::Value *AdjustedThisPtr =
CGM.getCXXABI().performThisAdjustment(*this, ThisPtr, Thunk.This);
ThisStore->setOperand(0, AdjustedThisPtr);