[InstCombine] Fix the signature of fgets_unlocked.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 May 2018 21:45:39 +0000 (21:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 May 2018 21:45:39 +0000 (21:45 +0000)
commit8ac15bf4dcec8f5569b308f0d0ac70a5f154af85
treeee2ce7e50f400051fad9585c91a75dca4796b5aa
parent659932b0b2c7ec9895b34891f614970a22319c19
[InstCombine] Fix the signature of fgets_unlocked.

It returns a pointer, not an int. This miscompiles all code that uses
the return value of fgets.

llvm-svn: 332531
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/test/Transforms/InstCombine/unlocked-stdio.ll