https://github.com/MaheshRavishankar approved this pull request. Thanks! Took me a while to work through if this is the easiest way of doing this. I cant think of anything better. https://github.com/llvm/llvm-project/pull/122492