Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 13 Jan 2010 12:45:23 +0000 (12:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 13 Jan 2010 12:45:23 +0000 (12:45 +0000)
commitb357e06f672996400343d38b08014a5b6a7d5b2d
tree22907ea5714f0dd34cac34ec6ae92dcd6642c5f2
parent81d22d87de93f501f90f55b6bbc63f5dd286797a
Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.

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