summaryrefslogtreecommitdiffstats
path: root/include/llvm/Value.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-05 23:06:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-05 23:06:32 +0000
commit53201869cdb92cfe298126ea9e6f5b763038d494 (patch)
tree534df7a9acd153318dac2c1a659aa1d330f9958f /include/llvm/Value.h
parentcf5fb2b614a7fea4565e405c81a3ae8037d78f7b (diff)
downloadexternal_llvm-53201869cdb92cfe298126ea9e6f5b763038d494.zip
external_llvm-53201869cdb92cfe298126ea9e6f5b763038d494.tar.gz
external_llvm-53201869cdb92cfe298126ea9e6f5b763038d494.tar.bz2
Document the use of getValueType() more accurately, specifically explain
that the instruction opcode is added to the InstructionVal value and the consequences of that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Value.h')
-rw-r--r--include/llvm/Value.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index ddfcbb6..3be3c5e 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -181,10 +181,12 @@ public:
/// 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;
}