llvm.org GIT mirror llvm / 0d49e11
[ThinLTO][C-API] Correct api comments Negative values never disabled the pruning - they simply set high values for the pruning interval. The behaviour now is that negative values set the maximum pruning interval (which appears to have been the intention from the start) see https://reviews.llvm.org/D41231. I have adjusted the comments to reflect this, removed any inaccurate statements, and corrected any typos I spotted in the English. Differential Revision: https://reviews.llvm.org/D41279 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321078 91177308-0d34-0410-b5e6-96231b3b80d8 Ben Dunbobbin 1 year, 8 months ago
2 changed file(s) with 12 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
147147 /// incremental build.
148148 void setCacheDir(std::string Path) { CacheOptions.Path = std::move(Path); }
149149
150 /// Cache policy: interval (seconds) between two prune of the cache. Set to a
151 /// negative value (default) to disable pruning. A value of 0 will be ignored.
150 /// Cache policy: interval (seconds) between two prunes of the cache. A
151 /// negative value sets the maximum possible pruning interval. A value
152 /// of 0 will be ignored.
152153 void setCachePruningInterval(int Interval) {
153154 static_assert(std::is_same
154155 std::chrono::seconds>::value,
756756 * @ingroup LLVMCTLTO
757757 *
758758 * These entry points control the ThinLTO cache. The cache is intended to
759 * support incremental build, and thus needs to be persistent accross build.
760 * The client enabled the cache by supplying a path to an existing directory.
759 * support incremental builds, and thus needs to be persistent across builds.
760 * The client enables the cache by supplying a path to an existing directory.
761761 * The code generator will use this to store objects files that may be reused
762762 * during a subsequent build.
763763 * To avoid filling the disk space, a few knobs are provided:
764 * - The pruning interval limit the frequency at which the garbage collector
765 * will try to scan the cache directory to prune it from expired entries.
766 * Setting to -1 disable the pruning (default).
764 * - The pruning interval limits the frequency at which the garbage collector
765 * will try to scan the cache directory to prune expired entries.
766 * Setting to a negative number applies the maximum interval.
767767 * - The pruning expiration time indicates to the garbage collector how old an
768768 * entry needs to be to be removed.
769 * - Finally, the garbage collector can be instructed to prune the cache till
769 * - Finally, the garbage collector can be instructed to prune the cache until
770770 * the occupied space goes below a threshold.
771771 * @{
772772 */
781781 const char *cache_dir);
782782
783783 /**
784 * Sets the cache pruning interval (in seconds). A negative value disable the
785 * pruning. An unspecified default value will be applied, and a value of 0 will
786 * be ignored.
784 * Sets the cache pruning interval (in seconds). A negative value sets the
785 * maximum possible pruning interval. An unspecified default value will be
786 * applied, and a value of 0 will be ignored.
787787 *
788788 * \since LTO_API_VERSION=18
789789 */