DwarfEhPrepare inserts calls to _Unwind_Resume into landing pads. If _Unwind_Resume happens to be defined in the same module and debug info is used, then this leads to a verifier error:
inlinable function call in a function with debug info must have a !dbg location call void @_Unwind_Resume(ptr %exn.obj) #0
Fix this by assigning a dummy location to the call. (As this happens in the backend, inlining is not actually relevant here.)
Having "!12" in the CHECK line is liable to future breakage if the metadata re-orders / upgrades / otherwise alters -- please instead capture the DISubprogram's node number and check against that.