https://github.com/jh7370 requested changes to this pull request. Overall, this doesn't look too bad, but there's a lot of tidying up that needs to happen before I'd be happy for this to be merged in. https://github.com/llvm/llvm-project/pull/75874