From: Benjamin Kramer Date: Tue, 8 Oct 2013 17:44:56 +0000 (+0000) Subject: IRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e3c2f07005aa2e4c935adb65f7f3e0176810fe68;p=oota-llvm.git IRBuilder: Downgrade InsertPointGuard's instruction pointer to a raw pointer. Sadly this loses the checking from AssertingVH, but apparently storing the end() of a BasicBlock into an AssertingVH has bad consequences as it's not really an instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192209 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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); } };