mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Added MachineCodeForInstruction object as an argument to
TmpInstruction constructors because every TmpInstruction object has to be registered with a MachineCodeForInstruction to prevent leaks. This simplifies the user's code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,9 +33,8 @@ InsertCodeToLoadConstant(Function *F,
|
||||
TargetMachine& target)
|
||||
{
|
||||
// Create a tmp virtual register to hold the constant.
|
||||
TmpInstruction* tmpReg = new TmpInstruction(opValue);
|
||||
MachineCodeForInstruction &mcfi = MachineCodeForInstruction::get(vmInstr);
|
||||
mcfi.addTemp(tmpReg);
|
||||
TmpInstruction* tmpReg = new TmpInstruction(mcfi, opValue);
|
||||
|
||||
target.getInstrInfo().CreateCodeToLoadConst(target, F, opValue, tmpReg,
|
||||
loadConstVec, mcfi);
|
||||
|
||||
Reference in New Issue
Block a user