Delete the BasicBlock ctor that only takes a BasicBlock to insert before. This

fails when the basic block points to the function->end.  Instead, require that
the client pass in the function AND the basicblock to insert into.

llvm-svn: 11112
This commit is contained in:
Chris Lattner 2004-02-04 03:57:34 +00:00
parent 0ff9da5fed
commit 040ad3afa8
1 changed files with 5 additions and 4 deletions

View File

@ -67,13 +67,14 @@ public:
typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator;
/// BasicBlock ctor - If the function parameter is specified, the basic block /// BasicBlock ctor - If the function parameter is specified, the basic block
/// is automatically inserted at the end of the function. /// is automatically inserted at either the end of the function (if
/// InsertBefore is null), or before the specified basic block.
/// ///
BasicBlock(const std::string &Name = "", Function *Parent = 0);
/// BasicBlock ctor - If the InsertBefore parameter is specified, the basic /// BasicBlock ctor - If the InsertBefore parameter is specified, the basic
/// block is automatically inserted right before the specified block. /// block is automatically inserted right before the specified block.
BasicBlock(const std::string &Name, BasicBlock *InsertBefore); ///
BasicBlock(const std::string &Name = "", Function *Parent = 0,
BasicBlock *InsertBefore = 0);
~BasicBlock(); ~BasicBlock();
// Specialize setName to take care of symbol table majik // Specialize setName to take care of symbol table majik