[PruneEH] A naked, noinline function can return via InlineAsm
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 27 Jun 2015 07:52:53 +0000 (07:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 27 Jun 2015 07:52:53 +0000 (07:52 +0000)
commit5185c3c271418eeac9ce8588210c9e103cdd08d4
tree8045563aba275668f80f7a755a40d375c4cc7cb7
parent02f32d93ee78eeda7cc2719bbcf1cfbad4490f6f
[PruneEH] A naked, noinline function can return via InlineAsm

The PruneEH pass tries to annotate functions as 'noreturn' if it doesn't
see a ReturnInst.  However, a naked function containing inline assembly
can contain control flow leaving the function.

This fixes PR23971.

llvm-svn: 240876
llvm/lib/Transforms/IPO/PruneEH.cpp
llvm/test/Transforms/PruneEH/pr23971.ll [new file with mode: 0644]