[PartiallyInlineLibCalls] Don't crash when there's a writeonly attribute on the call
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Jan 2022 11:04:40 +0000 (12:04 +0100)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Jan 2022 11:16:26 +0000 (12:16 +0100)
commitc8ffc73350dbb6044ca947bbead127b9b914cdf3
tree4b8659417a423ef616a9f9b3f472376cd481c4aa
parent96e220e6886868d6663d966ecc396befffc355e7
[PartiallyInlineLibCalls] Don't crash when there's a writeonly attribute on the call

readnone subsumes writeonly, so just swap out the attributes. The
verifier doesn't allow us to have both on a call.
llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
llvm/test/Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll