From 5cf816b09ed320a440d7dfcfac0d695d49947897 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 26 Sep 2002 05:03:17 +0000 Subject: [PATCH] - Add new ctor to BasicBlock to allow insertion before any BB, not just at the end of the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3933 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/BasicBlock.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index e545a575262..893792656c8 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -63,6 +63,10 @@ public: /// is automatically inserted at the end of the function. /// BasicBlock(const std::string &Name = "", Function *Parent = 0); + + /// BasicBlock ctor - If the InsertBefore parameter is specified, the basic + /// block is automatically inserted right before the specified block. + BasicBlock(const std::string &Name, BasicBlock *InsertBefore); ~BasicBlock(); // Specialize setName to take care of symbol table majik