diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-13 07:43:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-13 07:43:51 +0000 |
commit | f43e9231152346b8ddee0328431e6dbb24b4dd81 (patch) | |
tree | 0b5169e2b5954c3730fdb4cea98d534143f7d990 /lib/VMCore | |
parent | ef328f3a2f987c295005919a093af7b6d52c7d08 (diff) | |
download | external_llvm-f43e9231152346b8ddee0328431e6dbb24b4dd81.zip external_llvm-f43e9231152346b8ddee0328431e6dbb24b4dd81.tar.gz external_llvm-f43e9231152346b8ddee0328431e6dbb24b4dd81.tar.bz2 |
add a new insertAfter method, patch by Tom Jablin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 6635e70..b09ab93 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -74,6 +74,12 @@ void Instruction::insertBefore(Instruction *InsertPos) { InsertPos->getParent()->getInstList().insert(InsertPos, this); } +/// insertAfter - Insert an unlinked instructions into a basic block +/// immediately after the specified instruction. +void Instruction::insertAfter(Instruction *InsertPos) { + InsertPos->getParent()->getInstList().insertAfter(InsertPos, this); +} + /// moveBefore - Unlink this instruction from its current basic block and /// insert it into the basic block that MovePos lives in, right before /// MovePos. |