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
This commit is contained in:
Chris Lattner 2007-04-07 20:19:08 +00:00
parent a41c7b4bf2
commit af33e6579a

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