mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Support for passing Type to attributes
This commit is contained in:
parent
eb55b2d731
commit
617cdcbede
5 changed files with 131 additions and 94 deletions
|
@ -3852,6 +3852,8 @@ BfIRValue CeContext::CreateConstant(BfModule* module, uint8* ptr, BfType* bfType
|
|||
|
||||
BfIRValue CeContext::CreateAttribute(BfAstNode* targetSrc, BfModule* module, BfIRConstHolder* constHolder, BfCustomAttribute* customAttribute)
|
||||
{
|
||||
SetAndRestoreValue<bool> prevIgnoreWrites(module->mBfIRBuilder->mIgnoreWrites, true);
|
||||
|
||||
module->mContext->mUnreifiedModule->PopulateType(customAttribute->mType);
|
||||
auto ceAttrAddr = CeMalloc(customAttribute->mType->mSize) - mMemory.mVals;
|
||||
BfIRValue ceAttrVal = module->mBfIRBuilder->CreateConstAggCE(module->mBfIRBuilder->MapType(customAttribute->mType, BfIRPopulateType_Identity), ceAttrAddr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue