mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed array alloc bitcast in entry block
This commit is contained in:
parent
291d176e8f
commit
aed026f4fc
1 changed files with 2 additions and 2 deletions
|
@ -8415,10 +8415,10 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget
|
||||||
if (!isDynAlloc)
|
if (!isDynAlloc)
|
||||||
mBfIRBuilder->ClearDebugLocation(allocaInst);
|
mBfIRBuilder->ClearDebugLocation(allocaInst);
|
||||||
mBfIRBuilder->SetAllocaAlignment(allocaInst, allocAlign);
|
mBfIRBuilder->SetAllocaAlignment(allocaInst, allocAlign);
|
||||||
auto typedVal = BfTypedValue(mBfIRBuilder->CreateBitCast(allocaInst, mBfIRBuilder->MapType(arrayType)), arrayType);
|
|
||||||
mBfIRBuilder->ClearDebugLocation_Last();
|
|
||||||
if (!isDynAlloc)
|
if (!isDynAlloc)
|
||||||
mBfIRBuilder->SetInsertPoint(prevBlock);
|
mBfIRBuilder->SetInsertPoint(prevBlock);
|
||||||
|
auto typedVal = BfTypedValue(mBfIRBuilder->CreateBitCast(allocaInst, mBfIRBuilder->MapType(arrayType)), arrayType);
|
||||||
|
mBfIRBuilder->ClearDebugLocation_Last();
|
||||||
if (!noDtorCall)
|
if (!noDtorCall)
|
||||||
AddStackAlloc(typedVal, arraySize, NULL, scopeData, false, true);
|
AddStackAlloc(typedVal, arraySize, NULL, scopeData, false, true);
|
||||||
InitTypeInst(typedVal, scopeData, zeroMemory, sizeValue);
|
InitTypeInst(typedVal, scopeData, zeroMemory, sizeValue);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue