diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-08 17:44:56 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-08 17:44:56 +0000 |
| commit | b32b1be766f04a3b378b2e685748bd8eb05ac6ed (patch) | |
| tree | 2a089a5ee93660a4932cbbf1d1f8378959978a53 | |
| parent | 5815940edc2c655bc82825cfc5d7c4fc8d76c41f (diff) | |
| download | bcm5719-llvm-b32b1be766f04a3b378b2e685748bd8eb05ac6ed.tar.gz bcm5719-llvm-b32b1be766f04a3b378b2e685748bd8eb05ac6ed.zip | |
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
| -rw-r--r-- | llvm/include/llvm/IR/IRBuilder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h index 0adfbc40d55..e2aeed3556c 100644 --- a/llvm/include/llvm/IR/IRBuilder.h +++ b/llvm/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); } }; |

