[llvm-commits] CVS: llvm/include/llvm/Value.h Instruction.h

Chris Lattner sabre at nondot.org
Wed Jan 3 18:15:56 PST 2007



Changes in directory llvm/include/llvm:

Value.h updated: 1.88 -> 1.89
Instruction.h updated: 1.77 -> 1.78
---
Log message:

Now that setcondinst has been eliminated, we can mark Value::SubclassID
const and remove the ugly mutator methods.


---
Diffs of the changes:  (+1 -12)

 Instruction.h |    6 ------
 Value.h       |    7 +------
 2 files changed, 1 insertion(+), 12 deletions(-)


Index: llvm/include/llvm/Value.h
diff -u llvm/include/llvm/Value.h:1.88 llvm/include/llvm/Value.h:1.89
--- llvm/include/llvm/Value.h:1.88	Sat Dec 16 23:15:12 2006
+++ llvm/include/llvm/Value.h	Wed Jan  3 20:15:37 2007
@@ -48,7 +48,7 @@
 /// using this Value.
 /// @brief LLVM Value Representation
 class Value {
-  unsigned short SubclassID;         // Subclass identifier (for isa/dyn_cast)
+  const unsigned short SubclassID;   // Subclass identifier (for isa/dyn_cast)
 protected:
   /// SubclassData - This member is defined by this class, but is not used for
   /// anything.  Subclasses can use it to hold whatever state they find useful.
@@ -186,11 +186,6 @@
   /// getRawType - This should only be used to implement the vmcore library.
   ///
   const Type *getRawType() const { return Ty.getRawType(); }
-
-private:
-  /// FIXME: this is a gross hack, needed by another gross hack.  Eliminate!
-  void setValueType(unsigned short VT) { SubclassID = VT; }
-  friend class Instruction;
 };
 
 inline std::ostream &operator<<(std::ostream &OS, const Value &V) {


Index: llvm/include/llvm/Instruction.h
diff -u llvm/include/llvm/Instruction.h:1.77 llvm/include/llvm/Instruction.h:1.78
--- llvm/include/llvm/Instruction.h:1.77	Sat Dec 23 00:05:40 2006
+++ llvm/include/llvm/Instruction.h	Wed Jan  3 20:15:37 2007
@@ -39,12 +39,6 @@
   friend class SymbolTableListTraits<Instruction, BasicBlock, Function,
                                      ilist_traits<Instruction> >;
   void setParent(BasicBlock *P);
-
-private:
-  // FIXME: This is a dirty hack.  Setcc instructions shouldn't encode the CC
-  // into the opcode field.  When they don't, this will be unneeded.
-  void setOpcode(unsigned NewOpcode);
-  friend class BinaryOperator;
 protected:
   Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps,
               const std::string &Name = "",






More information about the llvm-commits mailing list