Browse Source

Fixed condbr on aliased mixin param value

Brian Fiete 3 years ago
parent
commit
91e856fc0b
1 changed files with 7 additions and 1 deletions
  1. 7 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 7 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -16217,8 +16217,14 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
 						mModule->mBfIRBuilder->DbgInsertDeclare(aliasValue, diVariable);
 					else
 					{
+						if (newLocalVar->mResolvedType->IsBoolean())
+						{
+							// Fix case of remote condbr referencing
+							newLocalVar->mAddr = mModule->CreateAlloca(newLocalVar->mResolvedType);
+							mModule->mBfIRBuilder->CreateStore(newLocalVar->mValue, newLocalVar->mAddr);
+						}
+
 						mModule->mBfIRBuilder->DbgInsertValueIntrinsic(aliasValue, diVariable);
-						//mModule->mBfIRBuilder->DbgInsertValueIntrinsic(newLocalVar->mValue, diVariable);
 					}
 				}
 			}