summaryrefslogtreecommitdiff
path: root/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-04-10 00:04:27 +0000
committerBill Wendling <isanbard@gmail.com>2011-04-10 00:04:27 +0000
commitd7bb295d223e028aa9ba7fbeafc8928db4a74972 (patch)
tree6bbe67645fc6f7c4500dc6df7b7966e203ffda3f /lib/VMCore/BasicBlock.cpp
parentb1145c8cee6ab749f00d07d3d7dab0d1d1fd0c06 (diff)
downloadllvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.tar.gz
llvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.tar.bz2
llvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.tar.xz
Beginning of the Great Exception Handling Rewrite.
* Add a "landing pad" attribute to the BasicBlock. * Modify the bitcode reader and writer to handle said attribute. Later: The verifier will ensure that the landing pad attribute is used in the appropriate manner. I.e., not applied to the entry block, and applied only to basic blocks that are branched to via a `dispatch' instruction. (This is a work-in-progress.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 955a0285b2..b46fab590f 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -38,10 +38,10 @@ LLVMContext &BasicBlock::getContext() const {
// are not in the public header file...
template class llvm::SymbolTableListTraits<Instruction, BasicBlock>;
-
BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
BasicBlock *InsertBefore)
- : Value(Type::getLabelTy(C), Value::BasicBlockVal), Parent(0) {
+ : Value(Type::getLabelTy(C), Value::BasicBlockVal), Parent(0),
+ IsLandingPad(false) {
// Make sure that we get added to a function
LeakDetector::addGarbageObject(this);
@@ -57,7 +57,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
setName(Name);
}
-
BasicBlock::~BasicBlock() {
// If the address of the block is taken and it is being deleted (e.g. because
// it is dead), this means that there is either a dangling constant expr