1 ; Test that if an invoked function is inlined, and if that function cannot
2 ; throw, that the dead handler is now unreachable.
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -inline -simplifycfg | llvm-dis | \
5 ; RUN: not grep UnreachableExceptionHandler
7 declare void %might_throw()
11 internal int %callee() {
12 invoke void %might_throw() to label %cont except label %exc
16 ; This just consumes the exception!
20 ; caller returns true if might_throw throws an exception... callee cannot throw.
22 %X = invoke int %callee() to label %cont
23 except label %UnreachableExceptionHandler
26 UnreachableExceptionHandler:
27 ret int -1 ; This is dead!