mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
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
This commit is contained in:
@@ -197,7 +197,7 @@ public:
|
|||||||
class InsertPointGuard {
|
class InsertPointGuard {
|
||||||
IRBuilderBase &Builder;
|
IRBuilderBase &Builder;
|
||||||
AssertingVH<BasicBlock> Block;
|
AssertingVH<BasicBlock> Block;
|
||||||
AssertingVH<Instruction> Point;
|
BasicBlock::iterator Point;
|
||||||
DebugLoc DbgLoc;
|
DebugLoc DbgLoc;
|
||||||
|
|
||||||
InsertPointGuard(const InsertPointGuard &) LLVM_DELETED_FUNCTION;
|
InsertPointGuard(const InsertPointGuard &) LLVM_DELETED_FUNCTION;
|
||||||
@@ -209,7 +209,7 @@ public:
|
|||||||
DbgLoc(B.getCurrentDebugLocation()) {}
|
DbgLoc(B.getCurrentDebugLocation()) {}
|
||||||
|
|
||||||
~InsertPointGuard() {
|
~InsertPointGuard() {
|
||||||
Builder.restoreIP(InsertPoint(Block, BasicBlock::iterator(Point)));
|
Builder.restoreIP(InsertPoint(Block, Point));
|
||||||
Builder.SetCurrentDebugLocation(DbgLoc);
|
Builder.SetCurrentDebugLocation(DbgLoc);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user