diff options
author | Reid Kleckner <rnk@google.com> | 2015-09-10 22:11:13 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-09-10 22:11:13 +0000 |
commit | 2586aac9087a9864ebd6cdee4f1f747e86eceaad (patch) | |
tree | fb8e71992550760423f6c7e36f98e57b995f887f /clang/lib/CodeGen/CGCleanup.h | |
parent | da6dcc5d926cb7481ff28b127c5e67da4501a99c (diff) | |
download | bcm5719-llvm-2586aac9087a9864ebd6cdee4f1f747e86eceaad.tar.gz bcm5719-llvm-2586aac9087a9864ebd6cdee4f1f747e86eceaad.zip |
[SEH] Use cleanupendpad so that WinEHPrepare gets the coloring right
Cleanupendpad is a lot like catchendpad, so we can reuse the same
EHScopeStack type.
llvm-svn: 247349
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.h')
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index d0569287ef0..5782343013c 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -101,7 +101,7 @@ protected: }; public: - enum Kind { Cleanup, Catch, Terminate, Filter, CatchEnd }; + enum Kind { Cleanup, Catch, Terminate, Filter, PadEnd }; EHScope(Kind kind, EHScopeStack::stable_iterator enclosingEHScope) : CachedLandingPad(nullptr), CachedEHDispatchBlock(nullptr), @@ -474,14 +474,14 @@ public: } }; -class EHCatchEndScope : public EHScope { +class EHPadEndScope : public EHScope { public: - EHCatchEndScope(EHScopeStack::stable_iterator enclosingEHScope) - : EHScope(CatchEnd, enclosingEHScope) {} - static size_t getSize() { return sizeof(EHCatchEndScope); } + EHPadEndScope(EHScopeStack::stable_iterator enclosingEHScope) + : EHScope(PadEnd, enclosingEHScope) {} + static size_t getSize() { return sizeof(EHPadEndScope); } static bool classof(const EHScope *scope) { - return scope->getKind() == CatchEnd; + return scope->getKind() == PadEnd; } }; @@ -523,8 +523,8 @@ public: Size = EHTerminateScope::getSize(); break; - case EHScope::CatchEnd: - Size = EHCatchEndScope::getSize(); + case EHScope::PadEnd: + Size = EHPadEndScope::getSize(); break; } Ptr += llvm::RoundUpToAlignment(Size, ScopeStackAlignment); @@ -574,12 +574,12 @@ inline void EHScopeStack::popTerminate() { deallocate(EHTerminateScope::getSize()); } -inline void EHScopeStack::popCatchEnd() { +inline void EHScopeStack::popPadEnd() { assert(!empty() && "popping exception stack when not empty"); - EHCatchEndScope &scope = cast<EHCatchEndScope>(*begin()); + EHPadEndScope &scope = cast<EHPadEndScope>(*begin()); InnermostEHScope = scope.getEnclosingEHScope(); - deallocate(EHCatchEndScope::getSize()); + deallocate(EHPadEndScope::getSize()); } inline EHScopeStack::iterator EHScopeStack::find(stable_iterator sp) const { |