mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Comptime GetCustomAttribute for type/field/method
This commit is contained in:
parent
434a7406de
commit
4c5c89bab5
8 changed files with 110 additions and 13 deletions
|
@ -2222,7 +2222,7 @@ void BfModule::HandleCEAttributes(CeEmitContext* ceEmitContext, BfTypeInstance*
|
|||
SetAndRestoreValue<CeEmitContext*> prevEmitContext(mCompiler->mCEMachine->mCurEmitContext, ceEmitContext);
|
||||
auto ceContext = mCompiler->mCEMachine->AllocContext();
|
||||
|
||||
BfIRValue attrVal = ceContext->CreateAttribute(customAttribute.mRef, this, typeInstance->mConstHolder, &customAttribute);
|
||||
BfIRValue attrVal =ceContext->CreateAttribute(customAttribute.mRef, this, typeInstance->mConstHolder, &customAttribute);
|
||||
for (int baseIdx = 0; baseIdx < checkDepth; baseIdx++)
|
||||
attrVal = mBfIRBuilder->CreateExtractValue(attrVal, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue