summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-21 07:11:21 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-21 07:11:21 +0000
commit20141f2d8cb0785d0117ca8804fa2320df738c9a (patch)
treed273428d44f308bd9e08248676969ba4593c1d5b /clang/lib/CodeGen/CGException.h
parent7535ee0352dbaf4b5c10fc0faeac65bad7d8a7bd (diff)
downloadbcm5719-llvm-20141f2d8cb0785d0117ca8804fa2320df738c9a.tar.gz
bcm5719-llvm-20141f2d8cb0785d0117ca8804fa2320df738c9a.zip
Rip out EHCleanupScope.
llvm-svn: 108999
Diffstat (limited to 'clang/lib/CodeGen/CGException.h')
-rw-r--r--clang/lib/CodeGen/CGException.h65
1 files changed, 3 insertions, 62 deletions
diff --git a/clang/lib/CodeGen/CGException.h b/clang/lib/CodeGen/CGException.h
index 8a2468fdc4c..e1c2fa9028a 100644
--- a/clang/lib/CodeGen/CGException.h
+++ b/clang/lib/CodeGen/CGException.h
@@ -57,13 +57,13 @@ public:
class EHScope {
llvm::BasicBlock *CachedLandingPad;
- unsigned K : 3;
+ unsigned K : 2;
protected:
- enum { BitsRemaining = 29 };
+ enum { BitsRemaining = 30 };
public:
- enum Kind { Cleanup, LazyCleanup, Catch, Terminate, Filter };
+ enum Kind { LazyCleanup, Catch, Terminate, Filter };
EHScope(Kind K) : CachedLandingPad(0), K(K) {}
@@ -234,61 +234,6 @@ public:
}
};
-/// A scope which needs to execute some code if we try to unwind ---
-/// either normally, via the EH mechanism, or both --- through it.
-class EHCleanupScope : public EHScope {
- /// The number of fixups required by enclosing scopes (not including
- /// this one). If this is the top cleanup scope, all the fixups
- /// from this index onwards belong to this scope.
- unsigned FixupDepth : BitsRemaining;
-
- /// The nearest normal cleanup scope enclosing this one.
- EHScopeStack::stable_iterator EnclosingNormal;
-
- /// The nearest EH cleanup scope enclosing this one.
- EHScopeStack::stable_iterator EnclosingEH;
-
- llvm::BasicBlock *NormalEntry;
- llvm::BasicBlock *NormalExit;
- llvm::BasicBlock *EHEntry;
- llvm::BasicBlock *EHExit;
-
-public:
- static size_t getSize() { return sizeof(EHCleanupScope); }
-
- EHCleanupScope(unsigned FixupDepth,
- EHScopeStack::stable_iterator EnclosingNormal,
- EHScopeStack::stable_iterator EnclosingEH,
- llvm::BasicBlock *NormalEntry, llvm::BasicBlock *NormalExit,
- llvm::BasicBlock *EHEntry, llvm::BasicBlock *EHExit)
- : EHScope(Cleanup), FixupDepth(FixupDepth),
- EnclosingNormal(EnclosingNormal), EnclosingEH(EnclosingEH),
- NormalEntry(NormalEntry), NormalExit(NormalExit),
- EHEntry(EHEntry), EHExit(EHExit) {
- assert((NormalEntry != 0) == (NormalExit != 0));
- assert((EHEntry != 0) == (EHExit != 0));
- }
-
- bool isNormalCleanup() const { return NormalEntry != 0; }
- bool isEHCleanup() const { return EHEntry != 0; }
-
- llvm::BasicBlock *getNormalEntry() const { return NormalEntry; }
- llvm::BasicBlock *getNormalExit() const { return NormalExit; }
- llvm::BasicBlock *getEHEntry() const { return EHEntry; }
- llvm::BasicBlock *getEHExit() const { return EHExit; }
- unsigned getFixupDepth() const { return FixupDepth; }
- EHScopeStack::stable_iterator getEnclosingNormalCleanup() const {
- return EnclosingNormal;
- }
- EHScopeStack::stable_iterator getEnclosingEHCleanup() const {
- return EnclosingEH;
- }
-
- static bool classof(const EHScope *Scope) {
- return Scope->getKind() == Cleanup;
- }
-};
-
/// An exceptions scope which filters exceptions thrown through it.
/// Only exceptions matching the filter types will be permitted to be
/// thrown.
@@ -379,10 +324,6 @@ public:
->getAllocatedSize();
break;
- case EHScope::Cleanup:
- Ptr += EHCleanupScope::getSize();
- break;
-
case EHScope::Terminate:
Ptr += EHTerminateScope::getSize();
break;
OpenPOWER on IntegriCloud