From 9636371b61eaf4d1084e5206045c633713be2bb7 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Sat, 12 Oct 2019 06:14:02 +0000 Subject: [PATCH] [llvm-lipo] Pass ArrayRef by value. Pass ArrayRef by value, fix formatting. NFC. Test plan: make check-all git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374637 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-lipo/llvm-lipo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/llvm-lipo/llvm-lipo.cpp b/tools/llvm-lipo/llvm-lipo.cpp index e746db41405..ba413b10fb0 100644 --- a/tools/llvm-lipo/llvm-lipo.cpp +++ b/tools/llvm-lipo/llvm-lipo.cpp @@ -441,10 +441,10 @@ readInputBinaries(ArrayRef InputFiles) { if (IF.ArchType && (B->isMachO() || B->isArchive())) { const auto S = B->isMachO() ? Slice(cast(B)) : Slice(cast(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) @@ -583,7 +583,7 @@ static void extractSlice(ArrayRef> InputBinaries, exit(EXIT_SUCCESS); } -static void checkArchDuplicates(const ArrayRef &Slices) { +static void checkArchDuplicates(ArrayRef Slices) { DenseMap CPUIds; for (const auto &S : Slices) { auto Entry = CPUIds.try_emplace(S.getCPUID(), S.getBinary()); -- 2.50.0