https://github.com/lenary approved this pull request. LGTM. This is a nice cleanup that I think makes most of the code clearer. One Nit which i meant to put into this review but posted as a single comment. https://github.com/llvm/llvm-project/pull/170905