aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-06 21:33:15 +0000
committerChris Lattner <sabre@nondot.org>2002-09-06 21:33:15 +0000
commitbded132d00ed626a6541b67ad101ef0fd47d3491 (patch)
treec6e5f14611cde979fe2c3f85257e4a402aedc53b /lib/VMCore/BasicBlock.cpp
parentfab8c796f6754962f5732145248303e3a1f7b96b (diff)
Move code out of header files into .cpp files to make future changes easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index d0859f8743..4271f32e7a 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -48,6 +48,9 @@ iplist<Instruction> &ilist_traits<Instruction>::getList(BasicBlock *BB) {
template SymbolTableListTraits<Instruction, BasicBlock, Function>;
+// BasicBlock ctor - If the function parameter is specified, the basic block is
+// automatically inserted at the end of the function.
+//
BasicBlock::BasicBlock(const std::string &name, Function *Parent)
: Value(Type::LabelTy, Value::BasicBlockVal, name) {
// Initialize the instlist...
@@ -62,6 +65,10 @@ BasicBlock::~BasicBlock() {
InstList.clear();
}
+void BasicBlock::setParent(Function *parent) {
+ InstList.setParent(parent);
+}
+
// Specialize setName to take care of symbol table majik
void BasicBlock::setName(const std::string &name, SymbolTable *ST) {
Function *P;