From 77755881329c52ad8dd9d5c6292a74f5fe9bf7f6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 27 Jun 2008 21:15:25 +0000 Subject: [PATCH] add a helper. llvm-svn: 52835 --- llvm/include/llvm/Value.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/include/llvm/Value.h b/llvm/include/llvm/Value.h index 6d4d7cc74ac9..51a25cb68950 100644 --- a/llvm/include/llvm/Value.h +++ b/llvm/include/llvm/Value.h @@ -93,6 +93,8 @@ public: /// 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 *getNameStart() const; + /// getNameEnd - Return a pointer to the end of the name. + const char *getNameEnd() const { return getNameStart() + getNameLen(); } /// isName - Return true if this value has the name specified by the provided /// nul terminated string.