1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Reworked partial debug definitions

This commit is contained in:
Brian Fiete 2019-12-21 11:27:50 -08:00
parent 9a5d563c6f
commit f1e2148769
3 changed files with 46 additions and 27 deletions

View file

@ -1889,8 +1889,16 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
bool wantsDIForwardDecl = (type->GetModule() != mModule) && (!type->IsFunction());
// Forward declarations of valuetypes don't work in LLVM backend for Win32.....
//TODO: Why was this commented out?
if ((!mIsBeefBackend) && (type->IsValueType()))
wantsDIForwardDecl = false;
bool wantsDIPartialDef = false;
if (wantsDIForwardDecl)
{
if ((!mIsBeefBackend) && (type->IsValueType()))
{
wantsDIPartialDef = true;
wantsDIForwardDecl = false;
}
}
if (mModule->mExtensionCount != 0)
wantsDIForwardDecl = true;
if (forceDbgDefine)
@ -2171,7 +2179,10 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
}
}
else
{
{
if (wantsDIPartialDef)
typeName += "$part";
// Will fill in later (during definition phase)
int flags = 0;
diForwardDecl = DbgCreateReplaceableCompositeType(llvm::dwarf::DW_TAG_structure_type,