[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp

Chris Lattner sabre at nondot.org
Sat Apr 7 13:19:25 PDT 2007



Changes in directory llvm/lib/Transforms/IPO:

SimplifyLibCalls.cpp updated: 1.104 -> 1.105
---
Log message:

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


---
Diffs of the changes:  (+1 -1)

 SimplifyLibCalls.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.104 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.105
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.104	Fri Apr  6 20:18:36 2007
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp	Sat Apr  7 15:19:08 2007
@@ -780,7 +780,7 @@
     // 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);






More information about the llvm-commits mailing list