add new isSingleStringRef()/getSingleStringRef() methods to twine,
authorChris Lattner <sabre@nondot.org>
Wed, 13 Jan 2010 07:12:06 +0000 (07:12 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 13 Jan 2010 07:12:06 +0000 (07:12 +0000)
commitbf86e5df180139310bf2f0d71bef58e208dce31d
treef36f04487db30ccf5c65a3def34030974a43f46f
parent0e7ab8cb07716305894fabcc512b8d5d0318bd4d
add new isSingleStringRef()/getSingleStringRef() methods to twine,
and use them to avoid a copy of a string in getNameWithPrefix in
the common case.  It seems like Value::setName and other places
should use this as well?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93301 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Twine.h
lib/VMCore/Mangler.cpp