From 085bb5f26e1fea728204821b27a14490e611180d Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 17 Oct 2024 14:10:07 -0400 Subject: [PATCH] Fixed fake alloca --- IDEHelper/Compiler/BfModule.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index f98af995..f626b34a 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -10131,11 +10131,12 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget { return GetDefaultValue(typeInstance); } - else - { - // Fake with alloca - return mBfIRBuilder->CreateAlloca(allocType); - } + else + { + // Fake with alloca + mBfIRBuilder->PopulateType(typeInstance); + return mBfIRBuilder->CreateAlloca(mBfIRBuilder->MapTypeInst(typeInstance)); + } } auto classVDataType = ResolveTypeDef(mCompiler->mClassVDataTypeDef);