aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-07-30 18:47:24 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-07-30 18:47:24 +0000
commitb63933975f7d7381bc4310925ce2a7ceb6095a88 (patch)
tree39fd07fbdbcce8464c9e7f932cd5247b4368f2e2 /lib/VMCore/BasicBlock.cpp
parent877fbcd8d7c6fb8f5c1fb10ddc39cf715f5421aa (diff)
Added vector of machine instructions for the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 04941075e3..cf8fc41bd7 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -13,6 +13,7 @@
#include "llvm/Type.h"
#include "llvm/CFG.h"
#include "llvm/iOther.h"
+#include "llvm/CodeGen/MachineInstr.h"
// Instantiate Templates - This ugliness is the price we have to pay
// for having a ValueHolderImpl.h file seperate from ValueHolder.h! :(
@@ -20,7 +21,10 @@
template class ValueHolder<Instruction, BasicBlock, Method>;
BasicBlock::BasicBlock(const string &name, Method *Parent)
- : Value(Type::LabelTy, Value::BasicBlockVal, name), InstList(this, 0) {
+ : Value(Type::LabelTy, Value::BasicBlockVal, name),
+ InstList(this, 0),
+ machineInstrVec(new MachineCodeForBasicBlock)
+{
if (Parent)
Parent->getBasicBlocks().push_back(this);
}
@@ -28,6 +32,7 @@ BasicBlock::BasicBlock(const string &name, Method *Parent)
BasicBlock::~BasicBlock() {
dropAllReferences();
InstList.delete_all();
+ delete machineInstrVec;
}
// Specialize setName to take care of symbol table majik