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...

llvm-svn: 77099
This commit is contained in:
Daniel Dunbar 2009-07-26 00:17:14 +00:00
parent 038a7f0d35
commit c1ab70760a
2 changed files with 1 additions and 8 deletions

View File

@ -130,7 +130,6 @@ public:
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

View File

@ -167,9 +167,7 @@ unsigned Value::getNameLen() const {
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 @@ void Value::setName(const Twine &Name) {
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!");