diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-28 18:31:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-28 18:31:01 +0000 |
commit | 83c9629291e3f4d4619fa98f8a57e4ec347c6154 (patch) | |
tree | e5bbac74194d759a5fe14d2c3528241425ba13c7 /lib/CodeGen/CGExprAgg.cpp | |
parent | ca4fc2c2620e184e8b96845a87b19d54f9e045c1 (diff) |
brain thinking memcpy, fingers thinking memset :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | lib/CodeGen/CGExprAgg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index b0596e2fee..b3d9cb6843 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -518,13 +518,13 @@ void CodeGenFunction::EmitAggregateCopy(llvm::Value *DestPtr, 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. |