[llvm-commits] [llvm] r77099 - in /llvm/trunk: include/llvm/Value.h lib/VMCore/Value.cpp
Daniel Dunbar
daniel at zuster.org
Sat Jul 25 17:17:33 PDT 2009
Author: ddunbar
Date: Sat Jul 25 19:17:14 2009
New Revision: 77099
URL: http://llvm.org/viewvc/llvm-project?rev=77099&view=rev
Log:
Remove Value::setName(const char*).
- Split into a separate patch because there is a slight functionality change,
it is no longer valid to call setName(0), which was equivalent to
setName(""). I'm hoping no one depends on this...
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=77099&r1=77098&r2=77099&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Sat Jul 25 19:17:14 2009
@@ -130,7 +130,6 @@
void setName(const Twine &Name);
void setName(const char *Name, unsigned NameLen);
- void setName(const char *Name); // Takes a null-terminated string.
/// takeName - transfer the name from V to this value, setting V's name to
Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=77099&r1=77098&r2=77099&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Sat Jul 25 19:17:14 2009
@@ -167,9 +167,7 @@
std::string Value::getNameStr() const {
- if (Name == 0) return "";
- return std::string(Name->getKeyData(),
- Name->getKeyData()+Name->getKeyLength());
+ return getName().str();
}
void Value::setName(const Twine &Name) {
@@ -178,10 +176,6 @@
setName(NameData.begin(), NameData.size());
}
-void Value::setName(const char *Name) {
- setName(Name, Name ? strlen(Name) : 0);
-}
-
void Value::setName(const char *NameStr, unsigned NameLen) {
if (NameLen == 0 && !hasName()) return;
assert(getType() != Type::VoidTy && "Cannot assign a name to void values!");
More information about the llvm-commits
mailing list