diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-07 20:19:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-07 20:19:08 +0000 |
commit | af33e6579a76611db02014e574bc4314cfb703df (patch) | |
tree | fb58238e59ec582fa0812b6c8fa5324cc056fa84 | |
parent | a41c7b4bf24e2f4173f105323bed5dc162a3f46e (diff) |
Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86
and Prolangs-C/cdecl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35749 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/SimplifyLibCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index a3be34577f..8aed1e8103 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -780,7 +780,7 @@ public: // do the concatenation for us. Value *MemcpyOps[] = { Dst, Src, - ConstantInt::get(SLC.getIntPtrType(), SrcLen), // length including nul. + ConstantInt::get(SLC.getIntPtrType(), SrcLen+1), // length including nul. ConstantInt::get(Type::Int32Ty, 1) // alignment }; new CallInst(SLC.get_memcpy(), MemcpyOps, 4, "", CI); |