mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Splat fixes, added debugging info for 'using' fields
This commit is contained in:
parent
ab4719422a
commit
8eda627e2f
5 changed files with 1687 additions and 1656 deletions
1169
IDEHelper/COFF.cpp
1169
IDEHelper/COFF.cpp
File diff suppressed because it is too large
Load diff
|
@ -3334,6 +3334,13 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
|
|||
constDIType, flags, useIntConstant ? intConstant : BfIRValue());
|
||||
diFieldTypes.push_back(memberType);
|
||||
|
||||
if (fieldDef->mUsingProtection != BfProtection_Hidden)
|
||||
{
|
||||
auto memberType = DbgCreateStaticMemberType(diForwardDecl, "$using$" + fieldName, fileDIScope, 0,
|
||||
constDIType, flags, useIntConstant ? intConstant : BfIRValue());
|
||||
diFieldTypes.push_back(memberType);
|
||||
}
|
||||
|
||||
if (staticValue)
|
||||
{
|
||||
String qualifiedName = DbgGetStaticFieldName(fieldInstance);
|
||||
|
@ -3384,6 +3391,13 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
|
|||
resolvedFieldDIType, flags, BfIRValue());
|
||||
diFieldTypes.push_back(memberType);
|
||||
|
||||
if (fieldDef->mUsingProtection != BfProtection_Hidden)
|
||||
{
|
||||
auto memberType = DbgCreateStaticMemberType(diForwardDecl, "$using$" + fieldDef->mName, fileDIScope, 0,
|
||||
resolvedFieldDIType, flags, BfIRValue());
|
||||
diFieldTypes.push_back(memberType);
|
||||
}
|
||||
|
||||
StringT<128> staticVarName;
|
||||
BfMangler::Mangle(staticVarName, mModule->mCompiler->GetMangleKind(), fieldInstance);
|
||||
if (!staticVarName.StartsWith('#'))
|
||||
|
@ -3416,6 +3430,14 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
|
|||
fieldInstance->mDataSize * 8, resolvedFieldType->mAlign * 8, fieldInstance->mDataOffset * 8,
|
||||
flags, resolvedFieldDIType);
|
||||
diFieldTypes.push_back(memberType);
|
||||
|
||||
if (fieldDef->mUsingProtection != BfProtection_Hidden)
|
||||
{
|
||||
auto memberType = DbgCreateMemberType(diForwardDecl, "$using$" + fieldName, fileDIScope, lineNum,
|
||||
fieldInstance->mDataSize * 8, resolvedFieldType->mAlign * 8, fieldInstance->mDataOffset * 8,
|
||||
flags, resolvedFieldDIType);
|
||||
diFieldTypes.push_back(memberType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4488,7 +4488,11 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
os << "\n";
|
||||
os.flush();*/
|
||||
|
||||
auto member = mDIBuilder->createMemberType((llvm::DIScope*)scope, name.c_str(), (llvm::DIFile*)file, lineNumber, sizeInBits, (uint32)alignInBits, offsetInBits, diFlags, (llvm::DIType*)type);
|
||||
const char* namePtr = name.c_str();
|
||||
if (name.IsEmpty())
|
||||
namePtr = NULL;
|
||||
|
||||
auto member = mDIBuilder->createMemberType((llvm::DIScope*)scope, namePtr, (llvm::DIFile*)file, lineNumber, sizeInBits, (uint32)alignInBits, offsetInBits, diFlags, (llvm::DIType*)type);
|
||||
SetResult(curId, member);
|
||||
//OutputDebugStrF("BfIRCmd_DbgCreateMemberType = %p\n", member);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue