[llvm-commits] CVS: llvm/include/llvm/CodeGen/InstrSelection.h
Vikram Adve
vadve at cs.uiuc.edu
Sat May 31 02:42:01 PDT 2003
Changes in directory llvm/include/llvm/CodeGen:
InstrSelection.h updated: 1.21 -> 1.22
---
Log message:
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.
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/InstrSelection.h
diff -u llvm/include/llvm/CodeGen/InstrSelection.h:1.21 llvm/include/llvm/CodeGen/InstrSelection.h:1.22
--- llvm/include/llvm/CodeGen/InstrSelection.h:1.21 Sun Sep 8 16:07:51 2002
+++ llvm/include/llvm/CodeGen/InstrSelection.h Sat May 31 02:41:24 2003
@@ -13,6 +13,7 @@
class MachineInstr;
class InstructionNode;
class TargetMachine;
+class MachineCodeForInstruction;
class Pass;
//===--------------------- Required Functions ---------------------------------
@@ -68,14 +69,19 @@
public:
// Constructor that uses the type of S1 as the type of the temporary.
// s1 must be a valid value. s2 may be NULL.
- TmpInstruction(Value *s1, Value *s2 = 0, const std::string &name = "");
+ TmpInstruction(MachineCodeForInstruction& mcfi,
+ Value *s1, Value *s2 = 0, const std::string &name = "");
// Constructor that requires the type of the temporary to be specified.
// Both S1 and S2 may be NULL.
- TmpInstruction(const Type *Ty, Value *s1 = 0, Value* s2 = 0,
+ TmpInstruction(MachineCodeForInstruction& mcfi,
+ const Type *Ty, Value *s1 = 0, Value* s2 = 0,
const std::string &name = "");
- virtual Instruction *clone() const { return new TmpInstruction(*this); }
+ virtual Instruction *clone() const {
+ assert(0 && "Cannot clone TmpInstructions!");
+ return 0;
+ }
virtual const char *getOpcodeName() const {
return "TempValueForMachineInstr";
}
More information about the llvm-commits
mailing list