projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cefb74
)
"There was a typo in my previous patch which leads to miscompilation of
author
Chris Lattner
<sabre@nondot.org>
Sun, 12 Apr 2009 18:22:33 +0000
(18:22 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 12 Apr 2009 18:22:33 +0000
(18:22 +0000)
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
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/SimplifyLibCalls.cpp
b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 7e23c95cded8a46f4fc9517fb5070bce377f4313..d53bc3f0cccd205260bfb8e0003b8f4e51f6fe15 100644
(file)
--- a/
lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/
lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@
-582,7
+582,7
@@
struct VISIBILITY_HIDDEN StrNCatOpt : public StrCatOpt {
// strncat(x, s, c) -> strcat(x, s)
// s is constant so the strcat can be optimized further
- EmitStrLenMemCpy(Src, Dst, Len, B);
+ EmitStrLenMemCpy(Src, Dst,
Src
Len, B);
return Dst;
}
};