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.

llvm-svn: 192209
This commit is contained in:
Benjamin Kramer 2013-10-08 17:44:56 +00:00
parent 57455fdc7c
commit f9db6465f7

View File

@ -197,7 +197,7 @@ public:
class InsertPointGuard {
IRBuilderBase &Builder;
AssertingVH<BasicBlock> Block;
AssertingVH<Instruction> 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);
}
};