aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Value.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 67cd11a..fa82bac 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -151,21 +151,11 @@ static bool getSymTab(Value *V, ValueSymbolTable *&ST) {
return false;
}
-/// getNameStart - Return a pointer to a null terminated string for this name.
-/// Note that names can have null characters within the string as well as at
-/// their end. This always returns a non-null pointer.
-const char *Value::getNameStart() const {
- if (Name == 0) return "";
- return Name->getKeyData();
+StringRef Value::getName() const {
+ if (!Name) return StringRef();
+ return Name->getKey();
}
-/// getNameLen - Return the length of the string, correctly handling nul
-/// characters embedded into them.
-unsigned Value::getNameLen() const {
- return Name ? Name->getKeyLength() : 0;
-}
-
-
std::string Value::getNameStr() const {
return getName().str();
}