[PATCH] D100724: [SimplifyLibCalls] Transform printf("%s", str"\n") --> puts(str).
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 18 07:03:11 PDT 2021
xbolva00 added a subscriber: efriedma.
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2397
// printf("foo\n") --> puts("foo")
if (FormatStr[FormatStr.size() - 1] == '\n' &&
FormatStr.find('%') == StringRef::npos) { // No format characters.
----------------
yurai007 wrote:
> xbolva00 wrote:
> > Can you change this to FormatStr.back() ?
> Sure.
Thanks, otherwise it is OK from me.
Mayybe @spatel / @fhahn / @efriedma take a second look?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100724/new/
https://reviews.llvm.org/D100724
More information about the llvm-commits
mailing list