From af33e6579a76611db02014e574bc4314cfb703df Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 7 Apr 2007 20:19:08 +0000 Subject: [PATCH] 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 --- lib/Transforms/IPO/SimplifyLibCalls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index a3be34577f8..8aed1e8103b 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);