Changes in directory llvm/lib/VMCore:
Value.cpp updated: 1.67 -> 1.68 --- Log message: add a setName variant that takes a null-terminated string. This can be used to avoid std::string allocations in common cases. --- Diffs of the changes: (+4 -0) Value.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.67 llvm/lib/VMCore/Value.cpp:1.68 --- llvm/lib/VMCore/Value.cpp:1.67 Mon Feb 12 12:52:59 2007 +++ llvm/lib/VMCore/Value.cpp Tue Feb 13 01:53:34 2007 @@ -122,6 +122,10 @@ 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!"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits