The code using it right now is unnecessarily challenging to read because there are `first` and `second` all over the place and one has no clue what is going on.
Instead, it would be good to replace it with a dedicated nested struct like so:
and update the code based on type errors (for example, you might need to update LLDB if it is using this type, or you might need to add 1-2 constructors which make this easy).
As part of the investigation, one should check if the `Module` is ever null. (The easy way to do this would be to have a constructor which asserts if it receives a nullptr). If so, try replacing the `ModuleDecl *` type with `NullablePtr<ModuleDecl>` and keep that if the resulting code is not too convoluted (it might help to add 1-2 convenience constructors). Otherwise, keep the assertion in and document the invariant in a comment.
Please @ me on GitHub (varungandhi-apple) or leave a comment here in case you need someone to guide you/review the PR.