1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed allocFlag handling in Dbg_ObjectCreatedEx and Dbg_ObjectAllocatedEx

This commit is contained in:
Brian Fiete 2025-05-16 08:37:54 +02:00
parent dd9bc6636b
commit 95a9c7aa8e
3 changed files with 14 additions and 12 deletions

View file

@ -10461,9 +10461,11 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget
llvmArgs.push_back(objectPtr);
llvmArgs.push_back(origSizeValue);
llvmArgs.push_back(vDataRef);
if (isAllocEx)
llvmArgs.push_back(mBfIRBuilder->CreateConst(BfTypeCode_Int8, allocFlags));
auto objectCreatedMethod = GetInternalMethod(isAllocEx ?
(isResultInitialized ? "Dbg_ObjectCreatedEx" : "Dbg_ObjectAllocatedEx") :
(isResultInitialized ? "Dbg_ObjectCreated" : "Dbg_ObjectAllocated"));
(isResultInitialized ? "Dbg_ObjectCreated" : "Dbg_ObjectAllocated"));
mBfIRBuilder->CreateCall(objectCreatedMethod.mFunc, llvmArgs);
if (wasAllocated)