diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-19 19:16:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-19 19:16:22 +0000 |
commit | cc3029acdd4489c2cfe4c3e39fcb59241790d590 (patch) | |
tree | d783d10bfde4006d0e05771eefe1085f80ab18db | |
parent | 0fe80bbbb6a017169d273c4824903b52a7ea2414 (diff) |
add a version of IRBuilder::SetInsertPoint that takes an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122180 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index c6b48473ac..10d96286ff 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -74,6 +74,13 @@ public: } /// SetInsertPoint - This specifies that created instructions should be + /// inserted before the specified instruction. + void SetInsertPoint(Instruction *I) { + BB = I->getParent(); + InsertPt = I; + } + + /// SetInsertPoint - This specifies that created instructions should be /// inserted at the specified point. void SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP) { BB = TheBB; |