Skip to content

Commit

Permalink
[llvm-lipo] Pass ArrayRef by value.
Browse files Browse the repository at this point in the history
Pass ArrayRef by value, fix formatting. NFC.

Test plan: make check-all

llvm-svn: 374637
  • Loading branch information
alexander-shaposhnikov committed Oct 12, 2019
1 parent ec6bfa8 commit b42e679
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions llvm/tools/llvm-lipo/llvm-lipo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,10 @@ readInputBinaries(ArrayRef<InputFile> InputFiles) {
if (IF.ArchType && (B->isMachO() || B->isArchive())) {
const auto S = B->isMachO() ? Slice(cast<MachOObjectFile>(B))
: Slice(cast<Archive>(B));
const auto SpecifiedCPUType =
MachO::getCPUTypeFromArchitecture(
MachO::mapToArchitecture(Triple(*IF.ArchType)))
.first;
const auto SpecifiedCPUType = MachO::getCPUTypeFromArchitecture(
MachO::getArchitectureFromName(
Triple(*IF.ArchType).getArchName()))
.first;
// For compatibility with cctools' lipo the comparison is relaxed just to
// checking cputypes.
if (S.getCPUType() != SpecifiedCPUType)
Expand Down Expand Up @@ -583,7 +583,7 @@ static void extractSlice(ArrayRef<OwningBinary<Binary>> InputBinaries,
exit(EXIT_SUCCESS);
}

static void checkArchDuplicates(const ArrayRef<Slice> &Slices) {
static void checkArchDuplicates(ArrayRef<Slice> Slices) {
DenseMap<uint64_t, const Binary *> CPUIds;
for (const auto &S : Slices) {
auto Entry = CPUIds.try_emplace(S.getCPUID(), S.getBinary());
Expand Down

0 comments on commit b42e679

Please sign in to comment.