[PATCH] D46285: [InstCombine] snprintf optimizations

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 14:30:53 PDT 2018


xbolva00 added a comment.

In https://reviews.llvm.org/D46285#1095205, @mstorsjo wrote:

> In https://reviews.llvm.org/D46285#1094989, @xbolva00 wrote:
>
> > In https://reviews.llvm.org/D46285#1094917, @mstorsjo wrote:
> >
> > > This caused lots of assertion errors in building code with mingw-w64 headers (where snprintf can be a static inline function), see https://bugs.llvm.org/show_bug.cgi?id=37408. I would like to revert this change to unbreak things until this can be fixed.
> >
> >
> > C standard says:
> >  int snprintf(char * restrict s, size_t n, const char * restrict format, ...);
>
>
> Yes, but that's not an argument for making the compiler trigger a failed assertion if faced with code that doesn't exactly comply with it. Reverted until this issue is fixed.


But I am not sure how to fix. This is not related to just snprintf case at all then.

@efriedma Eli know better what we should do, so please Eli can you look at that crash?


Repository:
  rL LLVM

https://reviews.llvm.org/D46285





More information about the llvm-commits mailing list