summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-13 07:43:51 +0000
committerChris Lattner <sabre@nondot.org>2009-01-13 07:43:51 +0000
commit6e66d0a6a1d31a5ce56e4672abf1923315eed864 (patch)
treed5cee910f8ebf7c63d5684fa1687a2be597caa0c /llvm/lib
parent70ff972e52f0ac92c18b3aa6d648a6eb1ca84898 (diff)
downloadbcm5719-llvm-6e66d0a6a1d31a5ce56e4672abf1923315eed864.tar.gz
bcm5719-llvm-6e66d0a6a1d31a5ce56e4672abf1923315eed864.zip
add a new insertAfter method, patch by Tom Jablin!
llvm-svn: 62158
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Instruction.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index 6635e704e2a..b09ab93aa11 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud