[PATCH] D41497: [ThinLTO][CachePruning] explicitly disable pruning
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 10:18:36 PST 2017
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM assuming the answer to my question below is "yes". =)
================
Comment at: lib/Support/CachePruning.cpp:170
+ return false;
if (Policy.Interval != seconds(0)) {
// Check whether the time stamp is older than our pruning interval.
----------------
bd1976llvm wrote:
> tejohnson wrote:
> > bd1976llvm wrote:
> > > tejohnson wrote:
> > > > Wouldn't this need to be *Policy.Interval, like in the below <= check?
> > > The != operator is overloaded so it does the right thing.
> > Ah ok, see that. It looks like <= has the same overloads - can the * be removed there?
> Nope. On some platforms, e.g. windows, the type of TimeStampModTime is nanoseconds. Therefore, none of the Optional <= operator overloads will match.
Oh I see. I suppose there are <= overloads to make the comparison between the Interval in std::chrono::seconds and a TimeStampModTime in nanoseconds work as desired?
https://reviews.llvm.org/D41497
More information about the llvm-commits
mailing list