Browse Source

Fixed IR type population issue with phi from const structs

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

+ 1 - 0
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -19095,6 +19095,7 @@ void BfExprEvaluator::Visit(BfConditionalExpression* condExpr)
 		}
 		}
 		else
 		else
 		{
 		{
+			mModule->mBfIRBuilder->PopulateType(trueValue.mType);
 			phi = mModule->mBfIRBuilder->CreatePhi(mModule->mBfIRBuilder->MapType(trueValue.mType), 2);
 			phi = mModule->mBfIRBuilder->CreatePhi(mModule->mBfIRBuilder->MapType(trueValue.mType), 2);
 			mModule->mBfIRBuilder->AddPhiIncoming(phi, trueValue.mValue, trueBlockPos);
 			mModule->mBfIRBuilder->AddPhiIncoming(phi, trueValue.mValue, trueBlockPos);
 			mModule->mBfIRBuilder->AddPhiIncoming(phi, falseValue.mValue, falseBlockPos);
 			mModule->mBfIRBuilder->AddPhiIncoming(phi, falseValue.mValue, falseBlockPos);