[PATCH] D105922: [lld-macho] Add LTO cache support

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 11:53:31 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:1190
+      int value = 0;
+      if (!llvm::to_integer(arg->getValue(), value))
+        error("-prune_interval_lto: invalid value: " + Twine(arg->getValue()));
----------------
no need for llvm::


================
Comment at: lld/MachO/LTO.h:12
 
+#include "lld/Common/LLVM.h"
 #include "llvm/ADT/SmallString.h"
----------------
if we only need MemoryBuffer in this header, can we just include MemoryBuffer.h?


================
Comment at: lld/test/MachO/lto-cache.ll:9-10
+; RUN: rm -Rf %t.cache && mkdir %t.cache
+; Create two files that would be removed by cache pruning due to age.
+; We should only remove files matching the pattern "llvmcache-*".
+; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
----------------
nit: we usually double-comment the "real" comments in lit tests, to distinguish them from RUN/CHECK lines


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105922/new/

https://reviews.llvm.org/D105922



More information about the llvm-commits mailing list