summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit32b5d841bad8be0c2b9269629d70306b22c93895 (patch)
tree7c49a22e81904378306f8e39ad3cb478fe93455c /llvm/lib/VMCore/BasicBlock.cpp
parentbf225041078531d0cabab939cedb642a8fd64b84 (diff)
downloadbcm5719-llvm-32b5d841bad8be0c2b9269629d70306b22c93895.tar.gz
bcm5719-llvm-32b5d841bad8be0c2b9269629d70306b22c93895.zip
Added vector of machine instructions for the basic block.
llvm-svn: 330
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 04941075e3e..cf8fc41bd74 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud