[clang] [CIR] Implement cleanups for temporaries with automatic duration (PR #189754)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 07:25:52 PDT 2026
================
@@ -91,6 +91,19 @@ class CIRGenFunction : public CIRGenTypeCache {
/// Tracks function scope overall cleanup handling.
EHScopeStack ehStack;
+ llvm::SmallVector<char, 256> lifetimeExtendedCleanupStack;
+
+ /// Header for data within LifetimeExtendedCleanupStack.
+ struct alignas(uint64_t) LifetimeExtendedCleanupHeader {
----------------
erichkeane wrote:
I kinda hate this.... am I getting this right that our `CleanupKind` is some sort of tail allocation? Why can't we just do that as a pointer to a different allocation and not do the ... funny business above?
This is getting really opaque of an implementation as a result of supporting the tail-allocation I think.
https://github.com/llvm/llvm-project/pull/189754
More information about the cfe-commits
mailing list