diff options
author | John McCall <rjmccall@apple.com> | 2010-08-13 21:20:51 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-13 21:20:51 +0000 |
commit | 612942d65f29278b4911c200f5c79db915dec73a (patch) | |
tree | 8e109fe339836b52dd12f2d786e860cc02166ea8 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | d1191ee43cd35bea5154480e10d3829d9fa2e762 (diff) | |
download | bcm5719-llvm-612942d65f29278b4911c200f5c79db915dec73a.tar.gz bcm5719-llvm-612942d65f29278b4911c200f5c79db915dec73a.zip |
Sketch out a framework for delaying the activation of a cleanup.
Not yet complete or used.
llvm-svn: 111044
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 325940d2452..3d212b5f782 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -96,7 +96,16 @@ struct BranchFixup { llvm::BranchInst *InitialBranch; }; -enum CleanupKind { NormalAndEHCleanup, EHCleanup, NormalCleanup }; +enum CleanupKind { + EHCleanup = 0x1, + NormalCleanup = 0x2, + NormalAndEHCleanup = EHCleanup | NormalCleanup, + + InactiveCleanup = 0x4, + InactiveEHCleanup = EHCleanup | InactiveCleanup, + InactiveNormalCleanup = NormalCleanup | InactiveCleanup, + InactiveNormalAndEHCleanup = NormalAndEHCleanup | InactiveCleanup +}; /// A stack of scopes which respond to exceptions, including cleanups /// and catch blocks. @@ -520,6 +529,8 @@ public: /// process all branch fixups. void PopCleanupBlock(bool FallThroughIsBranchThrough = false); + void ActivateCleanup(EHScopeStack::stable_iterator Cleanup); + /// \brief Enters a new scope for capturing cleanups, all of which /// will be executed once the scope is exited. class RunCleanupsScope { |