diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-31 07:41:24 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-05-31 07:41:24 +0000 |
commit | f3d3ca18b5a36f3a331367aa9ff0c3bcbd86ca82 (patch) | |
tree | 9e66723c3f2a70ddd884ac0abcba0c196793e3d1 /lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | |
parent | 3497782f3843007de3be0c43e3ff206a01e2ccac (diff) |
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
Diffstat (limited to 'lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp')
-rw-r--r-- | lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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); |