[PATCH] D41231: [Support][CachePruning] Fix regression that prevents disabling of pruning
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 18 09:48:45 PST 2017
labath added a comment.
I think that at this point you are already "implementing" disabling of pruning, only it's done via ugly decltype tricks. Have looked at how hard would it be to just make the interval be `llvm::Optional<Duration>` ? It would make things much cleaner and self-documenting.
If you don't want to embark on that, then maybe you could just set the interval to std::chrono::***nanoseconds***::max(). That way you won't get an overflow unless someone tries to convert this to picoseconds or something, and you will still have a pruning interval of several hundred years.
More information about the llvm-commits