[cfe-commits] r65701 - /cfe/trunk/lib/CodeGen/CGExprAgg.cpp

Chris Lattner sabre at nondot.org
Sat Feb 28 10:31:01 PST 2009


Author: lattner
Date: Sat Feb 28 12:31:01 2009
New Revision: 65701

URL: http://llvm.org/viewvc/llvm-project?rev=65701&view=rev
Log:
brain thinking memcpy, fingers thinking memset :)

Modified:
    cfe/trunk/lib/CodeGen/CGExprAgg.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=65701&r1=65700&r2=65701&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Sat Feb 28 12:31:01 2009
@@ -518,13 +518,13 @@
                                         llvm::Value *SrcPtr, QualType Ty) {
   assert(!Ty->isAnyComplexType() && "Shouldn't happen for complex");
   
-  // Aggregate assignment turns into llvm.memset.  This is almost valid per
+  // Aggregate assignment turns into llvm.memcpy.  This is almost valid per
   // C99 6.5.16.1p3, which states "If the value being stored in an object is
   // read from another object that overlaps in anyway the storage of the first
   // object, then the overlap shall be exact and the two objects shall have
   // qualified or unqualified versions of a compatible type."
   //
-  // memset is not defined if the source and destination pointers are exactly
+  // memcpy is not defined if the source and destination pointers are exactly
   // equal, but other compilers do this optimization, and almost every memcpy
   // implementation handles this case safely.  If there is a libc that does not
   // safely handle this, we can add a target hook.





More information about the cfe-commits mailing list