1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Removed lifetime.start and lifetime.end for LLVM

The lifetime annotations were causing errors in release builds, related to stack colorization
This commit is contained in:
Brian Fiete 2019-09-18 08:14:38 -07:00
parent 28c24e98d7
commit c0b73cdd6f
5 changed files with 60 additions and 20 deletions

View file

@ -1424,6 +1424,9 @@ void BeIRCodeGen::HandleNextCmd()
case BfIRCmd_LifetimeEnd:
{
CMD_PARAM(BeValue*, val);
#ifdef _DEBUG
val->mLifetimeEnded = true;
#endif
auto inst = mBeModule->AllocInst<BeLifetimeEndInst>();
inst->mPtr = val;
SetResult(curId, inst);
@ -3045,6 +3048,9 @@ BeValue* BeIRCodeGen::GetBeValue(int id)
{
auto& result = mResults[id];
BF_ASSERT(result.mKind == BeIRCodeGenEntryKind_Value);
#ifdef _DEBUG
BF_ASSERT(!result.mBeValue->mLifetimeEnded);
#endif
return result.mBeValue;
}