[llvm-commits] [llvm] r144657 - in /llvm/trunk: include/llvm/Value.h lib/VMCore/Value.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Nov 15 10:30:13 PST 2011
Author: d0k
Date: Tue Nov 15 12:30:12 2011
New Revision: 144657
URL: http://llvm.org/viewvc/llvm-project?rev=144657&view=rev
Log:
Remove Value::getNameStr. It has been deprecated for a while and provides no additional value over getName().
Modified:
llvm/trunk/include/llvm/Value.h
llvm/trunk/lib/VMCore/Value.cpp
Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=144657&r1=144656&r2=144657&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Tue Nov 15 12:30:12 2011
@@ -117,19 +117,8 @@
/// 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.
///
Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=144657&r1=144656&r2=144657&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Tue Nov 15 12:30:12 2011
@@ -156,10 +156,6 @@
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())
More information about the llvm-commits
mailing list