"There was a typo in my previous patch which leads to miscompilation of
authorChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 18:22:33 +0000 (18:22 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 18:22:33 +0000 (18:22 +0000)
commit5db4cdfc56f17959d3d0d3067af1b2346bcc0120
tree0816df6e67751961072ba3addaec342d1b702447
parent1cefb7419088baabbb1ada78f520b92e980a0a6c
"There was a typo in my previous patch which leads to miscompilation of
strncat :(

strncat(foo, "bar", 99)
would be optimized to
memcpy(foo+strlen(foo), "bar", 100, 1)
instead of
memcpy(foo+strlen(foo), "bar", 4, 1)"

Patch by Benjamin Kramer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68905 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimplifyLibCalls.cpp