https://github.com/haoNoQ approved this pull request. Works for me! IIUC nobody touched this code in a while, and that's probably because it's basically perfect for everyone's existing purposes. So I think moving it to ADT is appropriate. https://github.com/llvm/llvm-project/pull/99770