[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 06:10:19 PDT 2021
xbolva00 added a comment.
Looks fine
================
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.
----------------
Can you change this to FormatStr.back() ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100724/new/
https://reviews.llvm.org/D100724
More information about the llvm-commits
mailing list