https://github.com/DavidSpickett requested changes to this pull request. I think this function got a bit confused when we changed the return type to an optional, thanks for taking a look at it. https://github.com/llvm/llvm-project/pull/91882