[cfe-commits] r152142 - /cfe/trunk/include/clang/Edit/EditedSource.h

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Mar 6 12:48:46 PST 2012


On Mar 6, 2012, at 12:39 PM, Benjamin Kramer wrote:

> Author: d0k
> Date: Tue Mar  6 14:39:11 2012
> New Revision: 152142
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=152142&view=rev
> Log:
> Just use memcpy directly, uninitialized_copy requires an <algorithm> include.
> 
> Newer libstdc++s don't include it transitively everywhere.

Thanks!

> 
> Modified:
>    cfe/trunk/include/clang/Edit/EditedSource.h
> 
> Modified: cfe/trunk/include/clang/Edit/EditedSource.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Edit/EditedSource.h?rev=152142&r1=152141&r2=152142&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Edit/EditedSource.h (original)
> +++ cfe/trunk/include/clang/Edit/EditedSource.h Tue Mar  6 14:39:11 2012
> @@ -62,7 +62,7 @@
> 
>   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);
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list