diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 |
| commit | c7dac04c3480f3c20487f912f77343139fce2d99 (patch) | |
| tree | 21a09bce0171e27bd1e92649db9df797fa097cea /include/llvm/LTO/legacy/ThinLTOCodeGenerator.h | |
| parent | 044eb2f6afba375a914ac9d8024f8f5142bb912e (diff) | |
Notes
Diffstat (limited to 'include/llvm/LTO/legacy/ThinLTOCodeGenerator.h')
| -rw-r--r-- | include/llvm/LTO/legacy/ThinLTOCodeGenerator.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h b/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h index 14f0c48266f0..d794535700e5 100644 --- a/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h +++ b/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h @@ -148,10 +148,14 @@ public: /// incremental build. void setCacheDir(std::string Path) { CacheOptions.Path = std::move(Path); } - /// Cache policy: interval (seconds) between two prune of the cache. Set to a - /// negative value (default) to disable pruning. A value of 0 will be ignored. + /// Cache policy: interval (seconds) between two prunes of the cache. Set to a + /// negative value to disable pruning. A value of 0 will be ignored. void setCachePruningInterval(int Interval) { - if (Interval) + if (Interval == 0) + return; + if(Interval < 0) + CacheOptions.Policy.Interval.reset(); + else CacheOptions.Policy.Interval = std::chrono::seconds(Interval); } |
