[PATCH] D41279: [ThinLTO][C-API] Correct api comments

Katya Romanova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 15:24:25 PST 2017


kromanova accepted this revision.
kromanova added inline comments.


================
Comment at: include/llvm-c/lto.h:767
+ *    will try to scan the cache directory to prune expired entries.
+ *    Setting to a negative number applies the maximum interval.
  *  - The pruning expiration time indicates to the garbage collector how old an
----------------
It will be nice if you add one more clause in this sentence, explaining that this effectively disables pruning.


================
Comment at: include/llvm-c/lto.h:786
+ * Sets the cache pruning interval (in seconds). A negative value sets the
+ * maximum possible pruning interval. An unspecified default value will be
+ * applied, and a value of 0 will be ignored.
----------------
It looks like we are setting the default values in CachePruning.h, so the comment "An unspecified default value" could be substituted with "Default value of 1200 seconds (20 minutes) is applied".

Obsolete comments are confusing. When I called this API in Sony's proprietary linker, I relied on this particular comment and end up doing initialization myself in my code. BTW, Ben, since I noticed it, we need to remove this initialization code I talked about from our (Sony's) proprietary linker.  


https://reviews.llvm.org/D41279





More information about the llvm-commits mailing list