[PATCH] D61078: [LLD][NFC] Refactor: BuildID hash size calculation is now done in a single place.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 19:26:59 PDT 2019


ruiu added inline comments.


================
Comment at: lld/ELF/Writer.cpp:2551
+  // Compute a hash of all sections of the output file.
+  size_t HashSize = In.BuildId->HashSize;
+  std::vector<uint8_t> BuildId(HashSize);
----------------
nit: instead of assigning to a new variable, I'd use `In.BuildId->HashSize` directly everywhere.


================
Comment at: lld/ELF/Writer.cpp:2554
+  llvm::ArrayRef<uint8_t> Buf{Out::BufferStart, size_t(FileSize)};
   switch (Config->BuildId) {
   case BuildIdKind::Fast:
----------------
nit: add a blank line before `switch`.


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

https://reviews.llvm.org/D61078





More information about the llvm-commits mailing list