Fold iType into Value::VTy

llvm-svn: 14435
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index 5ddf284..1350f05 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -25,9 +25,7 @@
 
 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,
                          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 @@
   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);