diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h index 0adfbc40d55..e2aeed3556c 100644 --- a/include/llvm/IR/IRBuilder.h +++ b/include/llvm/IR/IRBuilder.h @@ -197,7 +197,7 @@ public: class InsertPointGuard { IRBuilderBase &Builder; AssertingVH Block; - AssertingVH Point; + BasicBlock::iterator Point; DebugLoc DbgLoc; InsertPointGuard(const InsertPointGuard &) LLVM_DELETED_FUNCTION; @@ -209,7 +209,7 @@ public: DbgLoc(B.getCurrentDebugLocation()) {} ~InsertPointGuard() { - Builder.restoreIP(InsertPoint(Block, BasicBlock::iterator(Point))); + Builder.restoreIP(InsertPoint(Block, Point)); Builder.SetCurrentDebugLocation(DbgLoc); } };