mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
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:
parent
038a7f0d35
commit
c1ab70760a
@ -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
|
||||
|
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user