[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 07:44:43 PDT 2025
================
@@ -4674,10 +4677,7 @@ VarCreationState Compiler<Emitter>::visitVarDecl(const VarDecl *VD,
if (!visitInitializer(Init))
return false;
- if (!this->emitFinishInit(Init))
- return false;
-
- return this->emitPopPtr(Init);
+ return this->emitFinishInitGlobal(Init);
----------------
tbaederr wrote:
Yes, `FinishInitGlobal` will copy the value to new memory that's been allocated in the `Program` and won't be freed at the end of the evaluation.
https://github.com/llvm/llvm-project/pull/144246
More information about the cfe-commits
mailing list