From f3d3ca18b5a36f3a331367aa9ff0c3bcbd86ca82 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Sat, 31 May 2003 07:41:24 +0000 Subject: 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 --- lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp') diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index a5a3662e93..268fb3d877 100644 --- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -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); -- cgit v1.2.3-70-g09d2