aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Value.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 9d6af5a334..1b9fe51332 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -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!");