https://github.com/labath approved this pull request. If you feel up to it, you could also put into the common code (under `#if !APPLE && !WINDOWS`) and delete the implementations in other OSes as well. https://github.com/llvm/llvm-project/pull/122040