diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-27 18:38:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-27 18:38:48 +0000 |
commit | dd7a707897b90955902dced68387e4799dee5799 (patch) | |
tree | 6f0e855dbecd0264ed5f4ca8b68b1e21ef8cc0e7 /llvm/lib/VMCore/Instruction.cpp | |
parent | a7c0a1164781cabf5fd7425a3f5dc280bc08313e (diff) | |
download | bcm5719-llvm-dd7a707897b90955902dced68387e4799dee5799.tar.gz bcm5719-llvm-dd7a707897b90955902dced68387e4799dee5799.zip |
Fold iType into Value::VTy
llvm-svn: 14435
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index 5ddf2843540..1350f05b9b1 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -25,9 +25,7 @@ void Instruction::init() Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, Instruction *InsertBefore) - : User(ty, Value::InstructionVal, Name), - Parent(0), - iType(it) { + : User(ty, Value::InstructionVal + it, Name), Parent(0) { init(); // If requested, insert this instruction into a basic block... @@ -40,9 +38,7 @@ Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, BasicBlock *InsertAtEnd) - : User(ty, Value::InstructionVal, Name), - Parent(0), - iType(it) { + : User(ty, Value::InstructionVal + it, Name), Parent(0) { init(); // append this instruction into the basic block @@ -50,6 +46,10 @@ Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, InsertAtEnd->getInstList().push_back(this); } +void Instruction::setOpcode(unsigned opc) { + setValueType(Value::InstructionVal + opc); +} + void Instruction::setParent(BasicBlock *P) { if (getParent()) { if (!P) LeakDetector::addGarbageObject(this); |