mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved null conditional lhs cast location
This commit is contained in:
parent
4ef6723ac2
commit
096dc0aaa3
4 changed files with 40 additions and 16 deletions
|
@ -83,11 +83,15 @@ bool BfModule::AddDeferredCallEntry(BfDeferredCallEntry* deferredCallEntry, BfSc
|
|||
auto prevInsertBlock = mBfIRBuilder->GetInsertBlock();
|
||||
mBfIRBuilder->SetInsertPoint(mCurMethodState->mIRHeadBlock);
|
||||
auto allocaInst = mBfIRBuilder->CreateAlloca(origParamTypes[paramIdx]);
|
||||
mBfIRBuilder->ClearDebugLocation(allocaInst);
|
||||
mBfIRBuilder->ClearDebugLocation_Last();
|
||||
mBfIRBuilder->SetInsertPoint(prevInsertBlock);
|
||||
if (WantsLifetimes())
|
||||
{
|
||||
mBfIRBuilder->CreateLifetimeStart(allocaInst);
|
||||
mBfIRBuilder->ClearDebugLocation_Last();
|
||||
}
|
||||
mBfIRBuilder->CreateStore(scopeArg, allocaInst);
|
||||
mBfIRBuilder->ClearDebugLocation_Last();
|
||||
deferredCallEntry->mScopeArgs[paramIdx] = allocaInst;
|
||||
if (WantsLifetimes())
|
||||
scopeData->mDeferredLifetimeEnds.push_back(allocaInst);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue