summaryrefslogtreecommitdiff
path: root/include/llvm/IR
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-10-08 17:44:56 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-10-08 17:44:56 +0000
commite3c2f07005aa2e4c935adb65f7f3e0176810fe68 (patch)
treebb5df7f555edd716909e1c2b6ee4ab380485f976 /include/llvm/IR
parentb359bda93d410623bbbc96dc9968d94447169a79 (diff)
downloadllvm-e3c2f07005aa2e4c935adb65f7f3e0176810fe68.tar.gz
llvm-e3c2f07005aa2e4c935adb65f7f3e0176810fe68.tar.bz2
llvm-e3c2f07005aa2e4c935adb65f7f3e0176810fe68.tar.xz
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
Diffstat (limited to 'include/llvm/IR')
-rw-r--r--include/llvm/IR/IRBuilder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h
index 0adfbc40d5..e2aeed3556 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -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);
}
};