================
@@ -679,6 +683,10 @@ struct AllSwitchPaths {
           ThreadingPath NewPath(Path);
           NewPath.appendExcludingFirst(IPath);
----------------
dybv-sc wrote:
Great suggestion! Added path limit as parameter for both functions. 
https://github.com/llvm/llvm-project/pull/145482