[PATCH] D136651: [Clang] Give Clang the ability to use a shared stat cache
Frederic Riss via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 4 17:39:36 PST 2023
friss added inline comments.
================
Comment at: clang/tools/clang-stat-cache/clang-stat-cache.cpp:291
+ IsCaseSensitive =
+ ::pathconf(TargetDirectory.c_str(), _PC_CASE_SENSITIVE) == 1;
+#endif
----------------
benlangmuir wrote:
> Is this pathconf extension Darwin-only?
I don't think so. It's a BSD extension.
================
Comment at: clang/tools/clang-stat-cache/clang-stat-cache.cpp:300
+ auto endTime = llvm::TimeRecord::getCurrentTime();
+ endTime -= startTime;
+
----------------
benlangmuir wrote:
> Nit: move subtraction to the print or create a new "duration" variable instead of mutating endTime. Same below for writeStatCache.
I would have done so originally if there was a TimeRecord overload that allows simple subtraction. I don't think that exists. I renamed the variable to `duration`, maybe it make the code a little more readable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136651/new/
https://reviews.llvm.org/D136651
More information about the cfe-commits
mailing list