diff options
author | Anders Carlsson <andersca@mac.com> | 2009-02-08 00:16:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-02-08 00:16:35 +0000 |
commit | bd6fa3d032acd7eafc6c10827c41103df45beab7 (patch) | |
tree | d9e1a6f42ccc3322bc0133cef91eebcff2aac3df /lib/CodeGen/CodeGenFunction.h | |
parent | 69c68b7454dc7f47def4ebf593a584d0f02c1ddb (diff) |
When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 8a0220724e..3dbc2c99e7 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -253,11 +253,22 @@ private: explicit CleanupEntry(llvm::BasicBlock *cb) : CleanupBlock(cb) {} + + ~CleanupEntry() { + assert(Blocks.empty() && "Did not empty blocks!"); + assert(BranchFixups.empty() && "Did not empty branch fixups!"); + } + }; /// CleanupEntries - Stack of cleanup entries. llvm::SmallVector<CleanupEntry, 8> CleanupEntries; + typedef llvm::DenseMap<llvm::BasicBlock*, size_t> BlockScopeMap; + + /// BlockScopes - Map of which "cleanup scope" scope basic blocks have. + BlockScopeMap BlockScopes; + public: CodeGenFunction(CodeGenModule &cgm); |