diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 409d4fbd0ae..9f5ca3e3d52 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -3278,16 +3278,8 @@ APFloat::APFloat(double d) : exponent2(0), sign2(0) { } namespace { - static void append(SmallVectorImpl &Buffer, - unsigned N, const char *Str) { - unsigned Start = Buffer.size(); - Buffer.set_size(Start + N); - memcpy(&Buffer[Start], Str, N); - } - - template - void append(SmallVectorImpl &Buffer, const char (&Str)[N]) { - append(Buffer, N, Str); + void append(SmallVectorImpl &Buffer, StringRef Str) { + Buffer.append(Str.begin(), Str.end()); } /// Removes data from the given significand until it is no more