mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed comptime malloc/free with custom allocator set
This commit is contained in:
parent
7e94abe43a
commit
dcd6f229af
1 changed files with 2 additions and 2 deletions
|
@ -7688,7 +7688,7 @@ BfIRFunction BfModule::GetBuiltInFunc(BfBuiltInFuncType funcTypeId)
|
|||
else
|
||||
{
|
||||
String funcName = mCompiler->mOptions.mMallocLinkName;
|
||||
if (funcName.IsEmpty())
|
||||
if ((funcName.IsEmpty()) || (mIsComptimeModule))
|
||||
funcName = "malloc";
|
||||
func = mBfIRBuilder->GetFunction(funcName);
|
||||
if (!func)
|
||||
|
@ -7711,7 +7711,7 @@ BfIRFunction BfModule::GetBuiltInFunc(BfBuiltInFuncType funcTypeId)
|
|||
else
|
||||
{
|
||||
String funcName = mCompiler->mOptions.mFreeLinkName;
|
||||
if (funcName.IsEmpty())
|
||||
if ((funcName.IsEmpty()) || (mIsComptimeModule))
|
||||
funcName = "free";
|
||||
func = mBfIRBuilder->GetFunction(funcName);
|
||||
if (!func)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue