Changes in directory llvm/include/llvm:
Value.h updated: 1.98 -> 1.99 --- Log message: Document the use of getValueType() more accurately, specifically explain that the instruction opcode is added to the InstructionVal value and the consequences of that. --- Diffs of the changes: (+6 -4) Value.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.98 llvm/include/llvm/Value.h:1.99 --- llvm/include/llvm/Value.h:1.98 Thu Feb 15 12:53:54 2007 +++ llvm/include/llvm/Value.h Mon Mar 5 17:06:32 2007 @@ -181,10 +181,12 @@ /// getValueType - Return an ID for the concrete type of this object. This is /// used to implement the classof checks. This should not be used for any /// other purpose, as the values may change as LLVM evolves. Also, note that - /// starting with the InstructionVal value, the value stored is actually the - /// Instruction opcode, so there are more than just these values possible here - /// (and Instruction must be last). - /// + /// for instructions, the Instruction's opcode is added to InstructionVal. So + /// this means three things: + /// # there is no value with code InstructionVal (no opcode==0). + /// # there are more possible values for the value type than in ValueTy enum. + /// # the InstructionVal enumerator must be the highest valued enumerator in + /// the ValueTy enum. unsigned getValueType() const { return SubclassID; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits