MCPcopy Create free account
hub / github.com/beefytech/Beef / GetFakeTypedValue

Method GetFakeTypedValue

IDEHelper/Compiler/BfModule.cpp:1595–1604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1593}
1594
1595BfTypedValue BfModule::GetFakeTypedValue(BfType* type)
1596{
1597 // This is a conservative "IsValueless", since it's not an error to use a fakeVal even if we don't need one
1598 if (type->mSize == 0)
1599 return BfTypedValue(BfIRValue::sValueless, type);
1600 else if (mBfIRBuilder != NULL)
1601 return BfTypedValue(mBfIRBuilder->GetFakeVal(), type);
1602 else
1603 return BfTypedValue(BfIRValue(BfIRValueFlags_Value, -1), type);
1604}
1605
1606BfTypedValue BfModule::GetDefaultTypedValue(BfType* type, bool allowRef, BfDefaultValueKind defaultValueKind)
1607{

Callers 6

InferGenericArgumentMethod · 0.80
CompareMethodsMethod · 0.80
CheckMethodMethod · 0.80
CreateCallMethod · 0.80
MatchMethodMethod · 0.80

Calls 3

BfTypedValueClass · 0.85
BfIRValueClass · 0.85
GetFakeValMethod · 0.80

Tested by

no test coverage detected