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:
parent
9a5d563c6f
commit
f1e2148769
3 changed files with 46 additions and 27 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue