mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed erroneous char ptr const generation
This commit is contained in:
parent
31af480c92
commit
e871bd6ace
1 changed files with 9 additions and 12 deletions
|
@ -2970,10 +2970,10 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
|
|||
diFieldTypes.push_back(memberType);
|
||||
}
|
||||
|
||||
bool isPayloadEnum = (typeInstance->IsEnum()) && (!typeInstance->IsTypedPrimitive());
|
||||
for (auto& fieldInstanceRef : typeInstance->mFieldInstances)
|
||||
bool isPayloadEnum = (typeInstance->IsEnum()) && (!typeInstance->IsTypedPrimitive());
|
||||
for (int fieldIdx = 0; fieldIdx < typeInstance->mFieldInstances.mSize; fieldIdx++)
|
||||
{
|
||||
auto fieldInstance = &fieldInstanceRef;
|
||||
auto fieldInstance = &typeInstance->mFieldInstances[fieldIdx];
|
||||
if (!fieldInstance->mFieldIncluded)
|
||||
continue;
|
||||
auto fieldDef = fieldInstance->GetFieldDef();
|
||||
|
@ -3091,18 +3091,15 @@ void BfIRBuilder::CreateDbgTypeDefinition(BfType* type)
|
|||
{
|
||||
staticValue = ConstToMemory(staticValue);
|
||||
wasMadeAddr = true;
|
||||
}
|
||||
else if (resolvedFieldType->IsPointer())
|
||||
}
|
||||
else if (constant->mTypeCode == BfTypeCode_StringId)
|
||||
{
|
||||
int stringId = constant->mInt32;
|
||||
const StringImpl& str = mModule->mContext->mStringObjectIdMap[stringId].mString;
|
||||
staticValue = mModule->GetStringCharPtr(str);
|
||||
}
|
||||
else if (constant->mTypeCode == BfTypeCode_StringId)
|
||||
{
|
||||
int stringId = constant->mInt32;
|
||||
const StringImpl& str = mModule->mContext->mStringObjectIdMap[stringId].mString;
|
||||
staticValue = mModule->GetStringObjectValue(str);
|
||||
if (resolvedFieldType->IsPointer())
|
||||
staticValue = mModule->GetStringCharPtr(str);
|
||||
else
|
||||
staticValue = mModule->GetStringObjectValue(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue