[PATCH] D61343: [llvm-objcopy] Cache gnu_debuglink's target CRC

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 13:04:26 PDT 2019


jakehehrlich accepted this revision.
jakehehrlich added a comment.
This revision is now accepted and ready to land.

This code looks good to me and the use case seems valid. I'll give my LGTM but please wait for others.



================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.cpp:494-498
+  // The gnu_debuglink's target is expected to not change or else its CRC would
+  // become invalidated and get rejected. There is no point in calculating the
+  // checksum of the target file for each object inside the archive; precompute
+  // the CRC here instead and use that value when needed. That saves significant
+  // amount of redundant I/O.
----------------
This comment reads a bit aggressive to me. Maybe something like "We can avoid recalculating the checksum for every target file inside an archive by precomputing the CRC here. This prevents a significant amount of I/O."


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

https://reviews.llvm.org/D61343





More information about the llvm-commits mailing list