[Coroutines] Handle InvokeInst in SalvageDebugInfo
Since coroutine would be splitted into pieces, compiler would move the dbg.declare intrinsic after the Storage is created to make sure the corresponding dbg instruction is still available aftet splitted. However, it would be problematic if the storage instruction is an InvokeInst, which is a terminator. We couldn't move instruction after an InvokeInst. This patch tries to move the dbg.declare intrinsic in the normal destination of the InvokeInst. It should make sense due to the Storage should be invalid in exception path.
Loading
Please sign in to comment