https://github.com/NagyDonat approved this pull request. LGTM. I'm happy to see that this change simplifies the logic and moves several scattered stacktrace helpers to a common location. https://github.com/llvm/llvm-project/pull/140035