[A64] Fix epilog label memory leak in ARM64 emitter

This commit is contained in:
Herman S.
2026-03-25 13:47:17 +09:00
parent dd3ffeb9cb
commit e54a053eca

View File

@@ -184,8 +184,9 @@ bool A64Emitter::Emit(hir::HIRBuilder* builder, EmitFunctionInfo& func_info) {
// ========================================================================
code_offsets.body = getSize();
// Allocate the epilog label.
// Allocate the epilog label (owned by label_cache_ for cleanup).
auto epilog_label_ptr = new Label();
label_cache_.push_back(epilog_label_ptr);
epilog_label_ = epilog_label_ptr;
// Walk HIR blocks and emit ARM64 instructions.