[PATCH] D84662: [llvm-libtool-darwin] Refactor Slice and writeUniversalBinary

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 14:24:05 PDT 2020


smeenai accepted this revision.
smeenai added a comment.

LGTM



================
Comment at: llvm/tools/llvm-lipo/llvm-lipo.cpp:543
+
+  llvm::stable_sort(Slices);
+  if (Error E = writeUniversalBinary(Slices, OutputFileName))
----------------
alexshap wrote:
> smeenai wrote:
> > What's the reason for not doing this sort inside writeUniversalBinary itself?
> Unless I'm missing something, it seems to be more natural / a better separation of concerns.
> Plus now the signature of this function has cleaned up a bit (ArrayRef)
Got it. I was wondering because it seems like each call is doing the sorting. The separation of concerns makes sense though, and it's definitely nicer for `writeUniversalBinary` to not be mutating the Slices array.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84662



More information about the llvm-commits mailing list