https://github.com/lntue approved this pull request. I feel like we shouldn't expose such internal function, which would become sort of public API. But I cannot think of a better solution at the moment. https://github.com/llvm/llvm-project/pull/108229