Details
- Reviewers
bruno sammccall - Commits
- rG930ada91ce8f: Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.
rL375031: Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.
rC375031: Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The plan is to instrument llvm::sys::fs::status with ALWAYS_ENABLED_STATITSTIC to be able to catch regressions causing lots of stat calls. That's why replacing current stat calls. And it seems to be a good change regardless of future plans.
Watching for regressions in stat calls sounds really useful.
This change is trivially equivalent on linux, but the code path is quite different on windows (I have no idea how ::stat works on windows, but our implementation of fs::status does lots of things).
I don't imagine it'll matter here though, and the original commits don't seem to have avoided fs::status on purpose.
Thanks for the review! If fs::status behaviour is sufficiently different on Windows, it is worth fixing because I believe majority of non-Windows developers expect them to work in the same way.