1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed build cache error, fixed ordered hash bug

Fixed error writing to build.bat when build directory was externally cleared
Fixed ordered hash errors where the fields were added but the hash didn't change
This commit is contained in:
Brian Fiete 2019-09-04 11:17:23 -07:00
parent d26e2957b0
commit 8659afa944
2 changed files with 32 additions and 1 deletions

View file

@ -244,7 +244,29 @@ void BeIRCodeGen::Hash(BeHashContext& hashCtx)
hashCtx.Mixin(mPtrSize);
hashCtx.Mixin(mIsOptimized);
if (mBeModule != NULL)
mBeModule->Hash(hashCtx);
mBeModule->Hash(hashCtx);
Array<BeStructType*> structHashList;
for (auto beType : mBeContext->mTypes)
{
if (!beType->IsStruct())
continue;
auto beStructType = (BeStructType*)beType;
if (beStructType->mHashId != -1)
continue;
structHashList.Add(beStructType);
}
structHashList.Sort([](BeStructType* lhs, BeStructType* rhs)
{
return lhs->mName < rhs->mName;
});
for (auto beStructType : structHashList)
{
beStructType->HashReference(hashCtx);
}
}
bool BeIRCodeGen::IsModuleEmpty()