[clang] [clang][bytecode] Split up `InterpState::dealllocate()` (PR #239185)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 6 00:04:31 PST 2026
================
@@ -93,21 +93,14 @@ void InterpState::cleanup() {
const Frame *InterpState::getCurrentFrame() { return Current; }
-void InterpState::deallocate(Block *B) {
+void InterpState::deallocateWithPointers(Block *B) {
assert(B);
+ assert(B->hasPointers());
assert(!B->isDynamic());
assert(!B->isGlobal());
assert(!B->isDead());
-
- // The block might have a pointer saved in a field in its data
- // that points to the block itself. We call the dtor first,
- // which will destroy all the data but leave InlineDescriptors
- // intact. If the block THEN still has pointers, we create a
- // DeadBlock for it.
- if (B->IsInitialized)
- B->invokeDtor();
-
assert(!B->isInitialized());
+
if (B->hasPointers()) {
----------------
tbaederr wrote:
Ah, yes.
https://github.com/llvm/llvm-project/pull/239185
More information about the cfe-commits
mailing list