Remove Value::getNameStr. It has been deprecated for a while and provides no addition...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 Nov 2011 18:30:12 +0000 (18:30 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 15 Nov 2011 18:30:12 +0000 (18:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144657 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Value.h
lib/VMCore/Value.cpp

index a71e2fdefd72a625c76cd3df74f74b4b3cd8831d..9b47143b7fdc1d8809fa9a557421c97ec5e5df1e 100644 (file)
@@ -117,19 +117,8 @@ public:
   /// 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
   /// modified.
-  ///
-  /// This is currently guaranteed to return a StringRef for which data() points
-  /// to a valid null terminated string. The use of StringRef.data() is 
-  /// deprecated here, however, and clients should not rely on it. If such 
-  /// behavior is needed, clients should use expensive getNameStr(), or switch 
-  /// to an interface that does not depend on null termination.
   StringRef getName() const;
 
-  /// getNameStr() - Return the name of the specified value, *constructing a
-  /// string* to hold it.  This is guaranteed to construct a string and is very
-  /// expensive, clients should use getName() unless necessary.
-  std::string getNameStr() const;
-
   /// setName() - Change the name of the value, choosing a new unique name if
   /// the provided name is taken.
   ///
index b9a1e54935d2aee6e4630425ec817f447248067a..291df917706c5ed122aa3b133a59e26e54047b86 100644 (file)
@@ -156,10 +156,6 @@ StringRef Value::getName() const {
   return Name->getKey();
 }
 
-std::string Value::getNameStr() const {
-  return getName().str();
-}
-
 void Value::setName(const Twine &NewName) {
   // Fast path for common IRBuilder case of setName("") when there is no name.
   if (NewName.isTriviallyEmpty() && !hasName())