@@ -1218,7 +1218,7 @@ CompilerValue *LLVMCodeBuilder::addFunctionCall(const std::string &functionName,
12181218 reg->isRawValue = true ;
12191219 ins->functionReturnReg = reg.get ();
12201220 m_instructions.push_back (ins);
1221- return addReg (reg);
1221+ return addReg (reg, ins );
12221222 }
12231223
12241224 m_instructions.push_back (ins);
@@ -1243,7 +1243,7 @@ CompilerConstant *LLVMCodeBuilder::addConstValue(const Value &value)
12431243{
12441244 auto constReg = std::make_shared<LLVMConstantRegister>(TYPE_MAP[value.type ()], value);
12451245 auto reg = std::reinterpret_pointer_cast<LLVMRegister>(constReg);
1246- return static_cast <CompilerConstant *>(static_cast <CompilerValue *>(addReg (reg)));
1246+ return static_cast <CompilerConstant *>(static_cast <CompilerValue *>(addReg (reg, nullptr )));
12471247}
12481248
12491249CompilerValue *LLVMCodeBuilder::addLoopIndex ()
@@ -1269,7 +1269,7 @@ CompilerValue *LLVMCodeBuilder::addVariableValue(Variable *variable)
12691269 ins->functionReturnReg = ret.get ();
12701270
12711271 m_instructions.push_back (ins);
1272- return addReg (ret);
1272+ return addReg (ret, ins );
12731273}
12741274
12751275CompilerValue *LLVMCodeBuilder::addListContents (List *list)
@@ -1298,7 +1298,7 @@ CompilerValue *LLVMCodeBuilder::addListItem(List *list, CompilerValue *index)
12981298 ins->functionReturnReg = ret.get ();
12991299
13001300 m_instructions.push_back (ins);
1301- return addReg (ret);
1301+ return addReg (ret, ins );
13021302}
13031303
13041304CompilerValue *LLVMCodeBuilder::addListItemIndex (List *list, CompilerValue *item)
@@ -1356,7 +1356,7 @@ CompilerValue *LLVMCodeBuilder::addProcedureArgument(const std::string &name)
13561356 ins->procedureArgIndex = index;
13571357
13581358 m_instructions.push_back (ins);
1359- return addReg (ret);
1359+ return addReg (ret, ins );
13601360}
13611361
13621362CompilerValue *LLVMCodeBuilder::createAdd (CompilerValue *operand1, CompilerValue *operand2)
@@ -2227,7 +2227,7 @@ LLVMRegister *LLVMCodeBuilder::createOp(const LLVMInstruction &ins, Compiler::St
22272227 auto ret = std::make_shared<LLVMRegister>(retType);
22282228 ret->isRawValue = true ;
22292229 createdIns->functionReturnReg = ret.get ();
2230- return addReg (ret);
2230+ return addReg (ret, createdIns );
22312231 }
22322232
22332233 return nullptr ;
0 commit comments