Add missing const to StringRef.copy()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Kledzik 2014-08-30 02:29:49 +00:00
parent fbf47c2d09
commit 23e2653009

View File

@ -118,7 +118,7 @@ namespace llvm {
}
// copy - Allocate copy in Allocator and return StringRef to it.
template <typename Allocator> StringRef copy(Allocator &A) {
template <typename Allocator> StringRef copy(Allocator &A) const {
char *S = A.template Allocate<char>(Length);
std::copy(begin(), end(), S);
return StringRef(S, Length);