Try to insert dbg.declare to entry.resume basic block in resume function. In this way, we could print alloca such as __promise in gdb/lldb under O2, which would be beneficial to debug coroutine program.
I am not sure whether this change is correct. I only test it by C++ programs locally. I would update the test case if needed. It could print __promise in all of the C++ coroutines I tested.
By the way, I think it is very beneficial to print the coroutine frame by keywords like __coro_frame. But I find it seems a little hard to implement.
Test-Plan: check-llvm
If we search for the dbg.value uses for parameters here and insert dbg.declare uses for the parameters, we could debug some parameter under O2 (for example this). But I am not sure if this is a good idea.