Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [InstCombine] Annotate strndup calls with dereferenceable_or_null | David Bolvansky | 2019-09-23 | 1 | -1/+1 |
| | | | | | | "Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size." llvm-svn: 372647 | ||||
* | [SLC] Convert some strndup calls to strdup calls | David Bolvansky | 2019-09-23 | 1 | -0/+67 |
Summary: Motivation: - If we can fold it to strdup, we should (strndup does more things than strdup). - Annotation mechanism. (Works for strdup well). strdup and strndup are part of C 20 (currently posix fns), so we should optimize them. Reviewers: efriedma, jdoerfert Reviewed By: jdoerfert Subscribers: lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67679 llvm-svn: 372636 |