diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-04-10 00:04:27 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-04-10 00:04:27 +0000 |
commit | d7bb295d223e028aa9ba7fbeafc8928db4a74972 (patch) | |
tree | 6bbe67645fc6f7c4500dc6df7b7966e203ffda3f /include | |
parent | b1145c8cee6ab749f00d07d3d7dab0d1d1fd0c06 (diff) | |
download | external_llvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.zip external_llvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.tar.gz external_llvm-d7bb295d223e028aa9ba7fbeafc8928db4a74972.tar.bz2 |
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 'include')
-rw-r--r-- | include/llvm/BasicBlock.h | 6 | ||||
-rw-r--r-- | include/llvm/Bitcode/LLVMBitCodes.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 7e7c9e7..3336b36 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -74,6 +74,7 @@ public: private: InstListType InstList; Function *Parent; + bool IsLandingPad; void setParent(Function *parent); friend class SymbolTableListTraits<BasicBlock, Function>; @@ -138,6 +139,11 @@ public: return const_cast<BasicBlock*>(this)->getFirstNonPHIOrDbg(); } + /// isLandingPad - True if this basic block is a landing pad for exception + /// handling. + bool isLandingPad() const { return IsLandingPad; } + void setIsLandingPad(bool Val = true) { IsLandingPad = Val; } + /// removeFromParent - This method unlinks 'this' from the containing /// function, but does not delete it. /// diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h index 7692bd2..dcfbe5a 100644 --- a/include/llvm/Bitcode/LLVMBitCodes.h +++ b/include/llvm/Bitcode/LLVMBitCodes.h @@ -106,8 +106,9 @@ namespace bitc { // The value symbol table only has one code (VST_ENTRY_CODE). enum ValueSymtabCodes { - VST_CODE_ENTRY = 1, // VST_ENTRY: [valid, namechar x N] - VST_CODE_BBENTRY = 2 // VST_BBENTRY: [bbid, namechar x N] + VST_CODE_ENTRY = 1, // VST_ENTRY: [valid, namechar x N] + VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N] + VST_CODE_LPADENTRY = 3 // VST_LPADENTRY: [lpadid, namechar x N] }; enum MetadataCodes { |