From df807dc27516b85bd26fc306f8075c94807743c5 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 27 Feb 2024 10:58:48 -0500 Subject: [PATCH] Adds payload enum payload descriminator value to reflection info --- IDEHelper/Compiler/BfModule.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 29350dd5..757fbbf2 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -5838,7 +5838,12 @@ BfIRValue BfModule::CreateFieldData(BfFieldInstance* fieldInstance, int customAt BfIRValue constValue; BfIRValue constValue2; - if (fieldInstance->GetFieldDef()->mIsConst) + if (fieldInstance->mIsEnumPayloadCase) + { + int tagId = -fieldInstance->mDataIdx - 1; + constValue = mBfIRBuilder->CreateConst(BfTypeCode_IntPtr, tagId); + } + else if (fieldInstance->GetFieldDef()->mIsConst) { if (fieldInstance->mConstIdx != -1) {