diff options
Diffstat (limited to 'llvm/lib/VMCore/Value.cpp')
-rw-r--r-- | llvm/lib/VMCore/Value.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index ee6f94ad386..c7af9313598 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -122,6 +122,10 @@ void Value::setName(const std::string &name) { setName(&name[0], name.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; if (getType() != Type::VoidTy && "Cannot assign a name to void values!"); |