implement Transforms/InstCombine/cast2.ll:test3 and PR1263
[oota-llvm.git] / include / llvm / Value.h
index 95d86ce7826f2447bae3d354c6a1ce584e643ef4..3be3c5e7be5cd41970ce16fafa3608b15eb6feb6 100644 (file)
@@ -87,7 +87,8 @@ public:
 
   // All values can potentially be named...
   inline bool hasName() const { return Name != 0; }
-  std::string getName() const;
+  std::string getName() const { return getNameStr(); }
+  std::string getNameStr() const;
   ValueName *getValueName() const { return Name; }
 
   void setName(const std::string &name);
@@ -180,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;
   }