aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-13 21:20:51 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-13 21:20:51 +0000
commitcd2d2b7814e0104ed41a8da159a06a8ca77b70d8 (patch)
treeaded9c80726d4e0490a0ac59fc7d249ddb04ea85 /lib/CodeGen/CGException.cpp
parent05eac86d547892847ca95b5350e28d681150fa68 (diff)
Sketch out a framework for delaying the activation of a cleanup.
Not yet complete or used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
-rw-r--r--lib/CodeGen/CGException.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp
index dd518cf5ef..d4a702a255 100644
--- a/lib/CodeGen/CGException.cpp
+++ b/lib/CodeGen/CGException.cpp
@@ -73,11 +73,13 @@ EHScopeStack::getEnclosingEHCleanup(iterator it) const {
void *EHScopeStack::pushCleanup(CleanupKind Kind, size_t Size) {
assert(((Size % sizeof(void*)) == 0) && "cleanup type is misaligned");
char *Buffer = allocate(EHCleanupScope::getSizeForCleanupSize(Size));
- bool IsNormalCleanup = Kind != EHCleanup;
- bool IsEHCleanup = Kind != NormalCleanup;
+ bool IsNormalCleanup = Kind & NormalCleanup;
+ bool IsEHCleanup = Kind & EHCleanup;
+ bool IsActive = !(Kind & InactiveCleanup);
EHCleanupScope *Scope =
new (Buffer) EHCleanupScope(IsNormalCleanup,
IsEHCleanup,
+ IsActive,
Size,
BranchFixups.size(),
InnermostNormalCleanup,