From 81da37bb94f5c2e45ad1d883c0507333cebffcc4 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 7 Sep 2019 15:34:05 -0700 Subject: [PATCH] Fixed another bug related to mDeclModule change --- IDEHelper/Compiler/BfModule.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 9021df49..ae12546e 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -10585,7 +10585,13 @@ BfModuleMethodInstance BfModule::ReferenceExternalMethodInstance(BfMethodInstanc BfModule* BfModule::GetOrCreateMethodModule(BfMethodInstance* methodInstance) { BfTypeInstance* typeInst = methodInstance->mMethodInstanceGroup->mOwner; - + + if (mBfIRBuilder == NULL) + { + // To allow for custom attribute data + PrepareForIRWriting(typeInst); + } + BfModule* declareModule = this; // Get to the optionless branch head -- but this could still be a specialized method module, not the true root while ((declareModule->mParentModule != NULL) && (!declareModule->mIsSpecializedMethodModuleRoot))