/// and deletes it.
///
void eraseFromParent();
+
+ /// moveBefore - Unlink this instruction from its current function and
+ /// insert it into the function that MovePos lives in, right before
+ /// MovePos.
+ void moveBefore(BasicBlock *MovePos);
/// getSinglePredecessor - If this basic block has a single predecessor block,
/// return the block, otherwise return a null pointer.
void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const BasicBlock *BB) { return true; }
+ static inline bool classof(const BasicBlock *) { return true; }
static inline bool classof(const Value *V) {
return V->getValueType() == Value::BasicBlockVal;
}
/// splitBasicBlock - This splits a basic block into two at the specified
/// instruction. Note that all instructions BEFORE the specified iterator
/// stay as part of the original basic block, an unconditional branch is added
- /// to the new BB, and the rest of the instructions in the BB are moved to the
- /// new BB, including the old terminator. The newly formed BasicBlock is
- /// returned. This function invalidates the specified iterator.
+ /// to the original BB, and the rest of the instructions in the BB are moved
+ /// to the new BB, including the old terminator. The newly formed BasicBlock
+ /// is returned. This function invalidates the specified iterator.
///
/// Note that this only works on well formed basic blocks (must have a
/// terminator), and 'I' must not be the end of instruction list (which would