SmallPtrSet: Reuse DenseMapInfo's pointer hash function instead of inventing a bad...
[oota-llvm.git] / include / llvm / Value.h
index 84ed037ae77eccadeb2fdea54afdc6f4e1e085dc..a82ac45c49edf3341017ba51340c908b19b10561 100644 (file)
@@ -107,9 +107,10 @@ public:
   /// All values hold a context through their type.
   LLVMContext &getContext() const;
 
-  // All values can potentially be named...
-  bool hasName() const { return Name != 0; }
+  // All values can potentially be named.
+  bool hasName() const { return Name != 0 && SubclassID != MDStringVal; }
   ValueName *getValueName() const { return Name; }
+  void setValueName(ValueName *VN) { Name = VN; }
   
   /// getName() - Return a constant reference to the value's name. This is cheap
   /// and guaranteed to return the same reference as long as the value is not