Fix an off-by-one error that broke Prolangs/deriv2 with llc on x86

and Prolangs-C/cdecl

llvm-svn: 35749
This commit is contained in:
Chris Lattner 2007-04-07 20:19:08 +00:00
parent 35aa06eb6a
commit 898d698d9f
1 changed files with 1 additions and 1 deletions

View File

@ -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);