[PATCH] D100724: [SimplifyLibCalls] Transform printf("%s", str"\n") --> puts(str).
Dawid Jurczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 18 06:33:56 PDT 2021
yurai007 marked an inline comment as done.
yurai007 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.
----------------
xbolva00 wrote:
> Can you change this to FormatStr.back() ?
Sure.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100724/new/
https://reviews.llvm.org/D100724
More information about the llvm-commits
mailing list