From: Nick Kledzik Date: Sat, 30 Aug 2014 02:29:49 +0000 (+0000) Subject: Add missing const to StringRef.copy() X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=23e26530091f6843641aa6b51425a71fe2581916;p=oota-llvm.git Add missing const to StringRef.copy() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216811 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 390e7f718a5..f1861c8f92b 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -118,7 +118,7 @@ namespace llvm { } // copy - Allocate copy in Allocator and return StringRef to it. - template StringRef copy(Allocator &A) { + template StringRef copy(Allocator &A) const { char *S = A.template Allocate(Length); std::copy(begin(), end(), S); return StringRef(S, Length);