OSDN Git Service

[FunctionAttrs] Don't try to infer returned if it is already on an argument
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 12 Sep 2016 16:04:59 +0000 (16:04 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 12 Sep 2016 16:04:59 +0000 (16:04 +0000)
commit5db0b906e8e74676badd156a8f9607d51851dd11
tree75dcd551b763590cd4812c8e89b2262880c04052
parent7e05343232602746587b6732db37966f51016d93
[FunctionAttrs] Don't try to infer returned if it is already on an argument

Trying to infer the 'returned' attribute if an argument is already
'returned' can lead to verification failure: inference might determine
that a different argument is passed through which would result in two
different arguments marked as 'returned'.

This fixes PR30350.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281221 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/FunctionAttrs.cpp
test/Transforms/FunctionAttrs/returned.ll