Removed redundant ctor.
[oota-llvm.git] / include / llvm / Value.h
index 26d2d1df4c65f66fd389285596694c3bb6b9143c..82e1502e585194f3c47969556ea785b40136b791 100644 (file)
@@ -58,7 +58,7 @@ protected:
   /// This field is initialized to zero by the ctor.
   unsigned short SubclassData;
 private:
-  PATypeHolder Ty;
+  PATypeHolder VTy;
   Use *UseList;
 
   friend class ValueSymbolTable; // Allow ValueSymbolTable to directly mod Name.
@@ -83,7 +83,7 @@ public:
 
   /// All values are typed, get the type of this value.
   ///
-  inline const Type *getType() const { return Ty; }
+  inline const Type *getType() const { return VTy; }
 
   // All values can potentially be named...
   inline bool hasName() const { return Name != 0; }
@@ -93,6 +93,8 @@ public:
   /// Note that names can have null characters within the string as well as at
   /// their end.  This always returns a non-null pointer.
   const char *getNameStart() const;
+  /// getNameEnd - Return a pointer to the end of the name.
+  const char *getNameEnd() const { return getNameStart() + getNameLen(); }
   
   /// isName - Return true if this value has the name specified by the provided
   /// nul terminated string.
@@ -220,12 +222,15 @@ public:
 
   /// getRawType - This should only be used to implement the vmcore library.
   ///
-  const Type *getRawType() const { return Ty.getRawType(); }
+  const Type *getRawType() const { return VTy.getRawType(); }
 
   /// stripPointerCasts - This method strips off any unneeded pointer
   /// casts from the specified value, returning the original uncasted value.
   /// Note that the returned value is guaranteed to have pointer type.
   Value *stripPointerCasts();
+  const Value *stripPointerCasts() const {
+    return const_cast<Value*>(this)->stripPointerCasts();
+  }
 };
 
 inline std::ostream &operator<<(std::ostream &OS, const Value &V) {