I think this is better solution than annotating callsites in IC/SLC.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Utils/BuildLibCalls.cpp | ||
---|---|---|
263 | Target buffer may not overlap with other args. I can remove it, but some future optimizations based on noalias info would be weaker. |
lib/Transforms/Utils/BuildLibCalls.cpp | ||
---|---|---|
263 | I was wrong, if that is the sprintf semantics, keep it. |
lib/Transforms/Utils/BuildLibCalls.cpp | ||
---|---|---|
263 | Yea :) man sprintf Some programs imprudently rely on code such as the following sprintf(buf, "%s some further text", buf); to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf()... |
This makes sense.