[llvm-commits] [commit-after-approval] printf("foo %s baz\n", "bar") -> puts("foo bar baz")

Eli Friedman eli.friedman at gmail.com
Mon Aug 3 13:48:35 PDT 2009


On Mon, Aug 3, 2009 at 1:22 PM, Mike Stump<mrs at apple.com> wrote:
> On Aug 3, 2009, at 10:48 AM, Ryan Flynn wrote:
>> given a printf() call format containing a single "%s" conversion
>> specifier and a constant string parameter, inlines parameter into
>> format and lowers printf() to puts().
>
> -fno-builtin needs to avoid having this done in general.  Some
> environments are carefully crafted (-ffreestanding -mkernel) and the
> transform can break them.

That seems tangential; there are all sorts of transformations in
SimplifyLibCalls that can break freestanding environments.

-Eli




More information about the llvm-commits mailing list