[clang] [CIR] Introduce more cleanup infrastructure (PR #152589)
Morris Hafner via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 11 07:43:12 PDT 2025
================
@@ -70,45 +70,89 @@ void EHScopeStack::deallocate(size_t size) {
}
void *EHScopeStack::pushCleanup(CleanupKind kind, size_t size) {
- char *buffer = allocate(size);
+ char *buffer = allocate(EHCleanupScope::getSizeForCleanupSize(size));
- // When the full implementation is upstreamed, this will allocate
- // extra memory for and construct a wrapper object that is used to
- // manage the cleanup generation.
- assert(!cir::MissingFeatures::ehCleanupScope());
+ EHCleanupScope *scope = new (buffer) EHCleanupScope(size);
----------------
mmha wrote:
Can you add a `errorNYI("SEH")`?
Note that I just asked the same thing here: https://github.com/llvm/llvm-project/pull/152802#discussion_r2266595757
https://github.com/llvm/llvm-project/pull/152589
More information about the cfe-commits
mailing list