[PATCH] D45736: [SimplifyLibcalls] Replace locked IO with unlocked IO

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 16:50:50 PDT 2018


xbolva00 added a comment.

In https://reviews.llvm.org/D45736#1092176, @efriedma wrote:

> The code looks fine.  But I'm a bit worried this could break in some cases.  It's possible a user could define a function named fputc_unlocked, so we wouldn't accept a valid C program.  And it's possible this could break some runtime instrumentation tools which haven't implemented the *_unlocked functions.  Or someone could use some obscure C library on Linux which doesn't have all the glibc extensions and get surprised by a link error.
>
> So I'm not sure what to do here; maybe get a second opinion on llvmdev?


We could check if e.g. fputc_unlocked is user defined in the current module, no?


https://reviews.llvm.org/D45736





More information about the llvm-commits mailing list