1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +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

@ -12043,7 +12043,8 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
value = newLocalVar->mConstValue;
auto aliasValue = mModule->mBfIRBuilder->CreateAliasValue(value);
scopeData.mDeferredLifetimeEnds.Add(aliasValue);
if (mModule->WantsLifetimes())
scopeData.mDeferredLifetimeEnds.Add(aliasValue);
if (newLocalVar->mAddr)
mModule->mBfIRBuilder->DbgInsertDeclare(aliasValue, diVariable);
@ -15156,7 +15157,7 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr)
auto startCheckTypeInst = target.mType->ToTypeInstance();
for (int pass = 0; pass < 2; pass++)
{
{
bool isFailurePass = pass == 1;
auto curCheckType = startCheckTypeInst;
@ -15318,6 +15319,16 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr)
}
}
if (indexArgument.mType->IsPrimitiveType())
{
auto primType = (BfPrimitiveType*)indexArgument.mType;
if ((!primType->IsSigned()) && (primType->mSize < 8))
{
// GEP will always do a signed upcast so we need to cast manually if we are unsigned
indexArgument = BfTypedValue(mModule->mBfIRBuilder->CreateNumericCast(indexArgument.mValue, false, BfTypeCode_IntPtr), mModule->GetPrimitiveType(BfTypeCode_IntPtr));
}
}
mModule->PopulateType(target.mType);
if (target.mType->IsSizedArray())
{