Just use memcpy directly, uninitialized_copy requires an <algorithm> include.

Newer libstdc++s don't include it transitively everywhere.

llvm-svn: 152142
This commit is contained in:
Benjamin Kramer 2012-03-06 20:39:11 +00:00
parent f7639e1b4a
commit ce80ce5fd8
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public:
StringRef copyString(StringRef str) {
char *buf = StrAlloc.Allocate<char>(str.size());
std::uninitialized_copy(str.begin(), str.end(), buf);
std::memcpy(buf, str.data(), str.size());
return StringRef(buf, str.size());
}
StringRef copyString(const Twine &twine);