mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed temp var deferred lifetime end issue in LLVM backend
This commit is contained in:
parent
1a85562d54
commit
a1c7e6e02b
1 changed files with 6 additions and 1 deletions
|
@ -3582,7 +3582,7 @@ void BfModule::VisitCodeBlock(BfBlock* block)
|
|||
auto lifetimeStart = mBfIRBuilder->CreateLifetimeStart(tempVar);
|
||||
mBfIRBuilder->ClearDebugLocation(lifetimeStart);
|
||||
|
||||
if (!mBfIRBuilder->mIgnoreWrites)
|
||||
if ((!mBfIRBuilder->mIgnoreWrites) && (IsTargetingBeefBackend()))
|
||||
mCurMethodState->mCurScope->mPrevScope->mDeferredLifetimeEnds.push_back(tempVar);
|
||||
mBfIRBuilder->SetInsertPoint(prevInsertBlock);
|
||||
if (exprEvaluator->mResult.IsSplat())
|
||||
|
@ -4314,6 +4314,11 @@ void BfModule::Visit(BfDeleteStatement* deleteStmt)
|
|||
|
||||
void BfModule::Visit(BfSwitchStatement* switchStmt)
|
||||
{
|
||||
if (mModuleName == "BeefTest_TestProgram")
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
BfScopeData outerScope;
|
||||
outerScope.mInnerIsConditional = false;
|
||||
outerScope.mCloseNode = switchStmt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue