[lld] r177557 - memcpy instead of copy_n. Faster than copy_n on MSVC :(.

Michael J. Spencer bigcheesegs at gmail.com
Wed Mar 20 11:58:07 PDT 2013


Author: mspencer
Date: Wed Mar 20 13:58:07 2013
New Revision: 177557

URL: http://llvm.org/viewvc/llvm-project?rev=177557&view=rev
Log:
memcpy instead of copy_n. Faster than copy_n on MSVC :(.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h

Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=177557&r1=177556&r2=177557&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Wed Mar 20 13:58:07 2013
@@ -355,7 +355,7 @@ void AtomSection<ELFT>::write(ELFWriter
     if (contentSize == 0)
       continue;
     uint8_t *atomContent = chunkBuffer + ai->_fileOffset;
-    std::copy_n(content.data(), contentSize, atomContent);
+    std::memcpy(atomContent, content.data(), contentSize);
     const TargetRelocationHandler<ELFT> &relHandler =
         this->_targetInfo.template getTargetHandler<ELFT>()
         .getRelocationHandler();





More information about the llvm-commits mailing list